Skip to main content
CVE-2026-66040VulnerabilityPublished 07/24/2026Updated 10/17/2026

Libav: FFmpeg through 8.1.2, fixed in commit b506faf, contains a heap out-of-bounds write vulnerability in the native PNG and APNG encoders that allows… (CVE-2026-66040)

Affects libavSource GCVE Database

0
CVSS 3.1 base score
8.8Medium
Exploitation

Not in CISA KEV, no exploitation reported

EPSS
0.7% chance of exploitation in 30 days – higher than 55% of CVEs
Patch
Available – fixed in 8.1.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

What to do

Affected software

ProductAffectedFixed in
GitHub Actionsffmpeg/FFmpegpkg:github/ffmpeg/FFmpegOther threatsAffected
  • <8.1.3
Fixed in
  • 8.1.3
Ubuntu:Pro:14.04:LTSlibavpkg:deb/ubuntu/libav?arch=source&distro=esm-infra-legacy/trustyOther threatsAffected
  • =6:0.8.7-1ubuntu2
  • =6:9.10-1ubuntu1
  • =6:9.10-1ubuntu2
  • =6:9.10-1ubuntu5
  • =6:9.10-1ubuntu6
  • =6:9.10-1ubuntu7
  • =6:9.11-2ubuntu1
  • =6:9.11-2ubuntu2
  • =6:9.13-0ubuntu0.14.04.1
  • =6:9.14-0ubuntu0.14.04.1
  • =6:9.16-0ubuntu0.14.04.1
  • =6:9.18-0ubuntu0.14.04.1
  • =6:9.20-0ubuntu0.14.04.1
  • =6:9.20-0ubuntu0.14.04.1+esm1
Fixed in–
Ubuntu:26.10ffmpegpkg:deb/ubuntu/ffmpeg?arch=source&distro=stonkingOther threatsAffected
  • =7:8.0.1-3ubuntu2
  • =7:8.1-3ubuntu3
  • =7:8.1.2-2ubuntu2
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix for this vulnerability is available in the commit identified as b506faf. Users and administrators should update FFmpeg to a version later than 8.1.2 that includes this fix. Since this is not a cloud service, manual patching or upgrading is required.

Description

FFmpeg versions up to 8.1.2 contain a heap out-of-bounds write vulnerability in the native PNG and APNG encoders. This vulnerability allows remote attackers to corrupt heap memory by crafting a malicious PNG image with a specially crafted eXIf chunk. The flaw can cause heap corruption, process crashes, and potentially arbitrary code execution. The issue is fixed in commit b506faf.

Summary

CVE-2026-66040 is a heap out-of-bounds write vulnerability affecting FFmpeg's native PNG and APNG encoders in versions up to 8.1.2. The vulnerability arises from improper handling of the eXIf chunk in PNG images, enabling remote attackers to corrupt heap memory. This can lead to heap corruption, application crashes, and may allow execution of arbitrary code. The vulnerability is addressed by a fix committed in b506faf.

Impact

Successful exploitation of this vulnerability can lead to heap memory corruption, causing process crashes and potentially allowing remote attackers to execute arbitrary code on affected systems. This poses a significant risk to systems processing malicious PNG images using vulnerable FFmpeg versions.

Weaknesses

References

Community reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses.

Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.