Skip to content
OpenAdvisories
Medium · 5.7 CVE-2025-59730 EUVD-2025-32191GHSA-3x55-g2vp-hv3w

Heap-buffer-overflow write in FFmpeg SANM decoding due to lack of bounds-checking in old_codec48

Published Oct 6, 2025 · Updated Oct 6, 2025 · Assigned by Google

Description

When decoding a frame for a SANM file (ANIM v0 variant), the decoded data can be larger than the buffer allocated for it.

Frames encoded with codec 48 can specify their resolution (width x height). A buffer of appropriate size is allocated depending on the resolution.

This codec can encode the frame contents using a run-length encoding algorithm. There are no checks that the decoded frame fits in the allocated buffer, leading to a heap-buffer-overflow.

process_frame_obj initializes the buffers based on the frame resolution:

We recommend upgrading to version 8.0 or beyond.

Affected products

VendorProductAffectedFixed
FFmpeg FFmpeg 829680f96a7a7ff02d1543895ec0fb713309d5c0 – < 8.0 8.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu Pro 14.04 LTS libav No fix yet —
ReleasePackageFixed inAdvisory
Alpine v3.24 ffmpeg 8.0-r0 —
Alpine v3.23 ffmpeg 8.0-r0 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling ffmpeg-7 +1 No fix yet —

Advisories 1

References