PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-125218 FFmpeg CVE debrief

A heap buffer overflow vulnerability exists in FFmpeg through 9.0.2 in the APNG encoder's encode_apng() function when frame size changes mid-stream. This could potentially lead to crashes or heap memory corruption in transcoding applications. The vulnerability is triggered when processing media with a resolution that grows mid-stream, allowing attackers to supply crafted media that causes APNG_DISPOSE_OP_BACKGROUND memset writes past prev_frame. Defenders and administrators of systems using FFmpeg for transcoding should assess exposure and prioritize remediation, especially where input media is untrusted or comes from potentially malicious sources.

Vendor
FFmpeg
Product
Unknown
CVSS
HIGH 7.3
CISA KEV
Not listed in stored evidence
Original CVE published
2026-11-09
Original CVE updated
2026-11-13
Advisory published
2026-11-09
Advisory updated
2026-11-13

Who should care

Defenders and administrators of systems using FFmpeg for transcoding should assess exposure and prioritize remediation, especially where input media is untrusted or comes from potentially malicious sources.

Why it matters

A heap buffer overflow vulnerability in FFmpeg's APNG encoder requires assessment and remediation to prevent potential crashes, data corruption, or service disruption in transcoding applications.

  • Potential crashes or heap memory corruption in transcoding applications
  • Need to verify and update FFmpeg versions to prevent exploitation
  • Possible data corruption or service disruption due to heap buffer overflow

Technical summary

The vulnerability exists in the APNG encoder's encode_apng() function in libavcodec/pngenc.c when frame size changes mid-stream. This could potentially lead to crashes or heap memory corruption in transcoding applications. The vulnerability is triggered when processing media with a resolution that grows mid-stream, allowing attackers to supply crafted media that causes APNG_DISPOSE_OP_BACKGROUND memset writes past prev_frame. The affected product is FFmpeg through version 9.0.2, and the vulnerability has been assessed as High severity.

Defensive priority

Assess exposure and prioritize remediation for systems using FFmpeg for transcoding, especially where input media is untrusted or comes from potentially malicious sources.

Recommended defensive actions

  • Assess exposure and prioritize remediation for systems using FFmpeg for transcoding, especially where input media is untrusted or comes from potentially malicious sources.
  • Verify FFmpeg version and update to a fixed version if available.
  • Implement compensating controls such as input validation and monitoring for suspicious transcoding activity.
  • Review and update incident response plans to include procedures for handling potential heap buffer overflow attacks.
  • Conduct a thorough review of system logs to detect any signs of exploitation.
  • Perform a code review of the APNG encoder's encode_apng() function to identify any potential vulnerabilities.
  • Consider implementing additional security controls such as data execution prevention (DEP) and address space layout randomization (ASLR).

Evidence notes

The vulnerability is in the APNG encoder's encode_apng() function in libavcodec/pngenc.c. Attackers can supply crafted media whose resolution grows mid-stream, causing APNG_DISPOSE_OP_BACKGROUND memset writes past prev_frame.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-125218 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-125218

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-125218 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-125218

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • FFmpeg through 9.0.2 contains a heap buffer overflow vulnerability in the APNG encoder's...

    Unverified legacy reference

    URL: https://github.com/advisories/GHSA-hp56-qgqc-859j

    github_advisory_database

  • Source reference

    Unverified legacy reference

    URL: https://github.com/FFmpeg/FFmpeg/commit/9b99973b2bbecee0b7e1e57035b95498b42f54a6

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25682

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://github.com/FFmpeg/FFmpeg

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/pngenc.c

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-apng-encoder-heap-buffer-overflow-via-encode-apng

    Supplemental source

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.