Skip to main content
← Vulnerabilities

FFmpeg through 9.0.2 Heap Buffer Overflow in libwebp Encoder Conditional Replenishment

Affects FFmpeg through 9.0.2 when the libwebp encoder's cr_threshold option is set and the input resolution increases mid-stream. No fixed version is listed in the checked facts.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

7.3HighCNA
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. The cr_threshold option is set (libwebp encoder conditional replenishment). The input media's resolution increases mid-stream.

Published
Last modified
12/100 · provisional
Specific setups only
None on Exploit-DB, Metasploit or GitHub

Summary

FFmpeg through 9.0.2 contains a heap buffer overflow in ff_libwebp_get_frame() in libwebpenc_common.c that lets attackers corrupt memory when cr_threshold is set. Attackers can supply crafted media that increases resolution mid-stream, causing memcpy() to write pixel data past the stale reference frame and crash applications.

cve.now Index

12Pcve.now Index 12 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity7.3/10CVSS 7.3
  • No patch0/5No signal

What would change the score

  • Would score about 62 if added to CISA KEV
  • Would score about 57 if CISA's SSVC rates exploitation active
  • Would score about 22 if CISA's SSVC rates it automatable

What to do

  • Check whether your setup matches what the bug needs.

    The cr_threshold option is set (libwebp encoder conditional replenishment). The input media's resolution increases mid-stream.
  • Apply the patch listed under Evidence.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • FFmpeg FFmpeg

    through 9.0.2

Evidence 5

  1. Patch
  2. Report
  3. Repository
  4. Repository
  5. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-125204

Is CVE-2026-125204 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?

The libwebp encoder in FFmpeg can write pixel data past the end of a reference frame buffer, which corrupts memory and can crash applications. The overflow happens when the cr_threshold option is set and the input resolution increases mid-stream.Source: vulncheck.com

Which versions are affected by CVE-2026-125204?

FFmpeg: through 9.0.2.Source: cve.now feed data

Am I affected, and how do I check?

FFmpeg versions up to and including 9.0.2 are listed as affected. The bug needs the libwebp encoder with the cr_threshold option set and a stream whose resolution increases mid-stream, so check whether cr_threshold appears in the encoder options used with the ffmpeg command or in the application's FFmpeg settings.Source: vulncheck.com

How do I fix CVE-2026-125204?

The checked facts do not name a fixed FFmpeg version, so no upgrade target can be confirmed from them. Check the FFmpeg project's advisory or release notes for a patched release before relying on any version.Source: vulncheck.com