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

Medium 5.7 Published Updated

A heap-buffer-overflow in FFmpeg's SANM decoder allows attackers to execute arbitrary code or cause denial of service via crafted media files.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-59730?

CVE-2025-59730 is a medium-severity memory corruption vulnerability in FFmpeg, published on 6 Oct 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-787

Which versions are affected by CVE-2025-59730?

How do I fix CVE-2025-59730?

No fix has been published for CVE-2025-59730 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-59730 being exploited?

There is no known exploitation of CVE-2025-59730 in the wild and no public exploit code.

Sources

Also known as GHSA-3x55-g2vp-hv3w, MINI-h2v5-5cj7-g638, UBUNTU-CVE-2025-59730.

Is CVE-2025-59730 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free