FFmpeg through 9.0.2 GIF Encoder Heap Buffer Overflow via shrunk_buf Remap
Affects FFmpeg through 9.0.2 when the GIF encoder handles PAL8 video whose frame linesize grows mid-stream, such as during GIF transcoding.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
- Exploited
- No known exploitation
- Fix
- Fix or patch referenced
- Who is exposed
- Specific setups only
Do first: Check whether your setup matches what the bug needs. Input is PAL8 video Frame linesize grows mid-stream after the first frame GIF encoder is used, such as during GIF transcoding
- Last modified
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 14/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Specific setups only
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
FFmpeg versions up to and including 9.0.2 have a heap buffer overflow in the GIF encoder that a local attacker can trigger without logging in, though it requires a user to take an action such as transcoding a crafted video to GIF. Successful exploitation can corrupt heap memory, with potential impact on confidentiality, integrity, and availability.
Read the original description
FFmpeg through 9.0.2 contains a heap buffer overflow in the GIF encoder's gif_image_write_image() in libavcodec/gif.c because shrunk_buf is sized from the first frame's linesize. Attackers can supply PAL8 video whose frame linesize grows mid-stream, causing remap_frame_to_palette() to write past shrunk_buf and corrupt the heap during GIF transcoding.
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure5/25Specific setups only
- Reach?/20Unknown. No tracked technology or package matched
- Severity8.5/10CVSS 8.5
- No patch0/5No signal
What would change the score
- Would score about 64 if added to CISA KEV
- Would score about 59 if CISA's SSVC rates exploitation active
- Would score about 24 if CISA's SSVC rates it automatable
What to do
Check whether your setup matches what the bug needs.
Input is PAL8 video Frame linesize grows mid-stream after the first frame GIF encoder is used, such as during GIF transcodingApply the patch listed under Evidence.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- FFmpeg FFmpeg
through 9.0.2
Evidence 5
- Patch
- Report
- Repository
- Repository
- Link
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-125250
Is CVE-2026-125250 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
What does this mean?
A heap buffer overflow in FFmpeg's GIF encoder. When a PAL8 video's frame linesize grows after the first frame, palette remapping writes past a heap buffer and corrupts heap memory.Source: vulncheck.com
Which versions are affected by CVE-2026-125250?
FFmpeg: through 9.0.2.Source: cve.now feed data
Am I affected, and how do I check?
FFmpeg versions through 9.0.2 are listed as affected. The setup involves GIF encoding, such as GIF transcoding, of PAL8 video whose linesize changes after the first frame. To check, run ffmpeg -version to see the version and review the input's pixel format and whether GIF output is used.Source: vulncheck.com
How do I fix CVE-2026-125250?
The checked facts do not name a fixed version, so no specific upgrade target can be given. Check FFmpeg's release notes or security advisories for a later release that addresses this issue.Source: vulncheck.com