
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-66040 is a heap out-of-bounds write vulnerability in FFmpeg's native PNG and APNG encoders that allows remote attackers to corrupt heap memory by supplying a crafted PNG image with a malicious eXIf chunk. It affects FFmpeg through version 8.1.2 and was disclosed on July 24, 2026, with a fix available in commit b506faf. The vulnerability carries a CVSS v3.1 base score of 8.8 (High) and a CVSS v4.0 base score of 8.7 (High) (GitHub Advisory, VulnCheck).
The root cause is a heap-based buffer overflow (CWE-122) in FFmpeg's PNG/APNG encoder logic. The function add_exif_profile_size() underestimates the required buffer size when multiple IFD entries in a crafted eXIf chunk reference the same large value payload. During canonical serialization, png_write_chunk() writes tens of thousands of bytes past the allocated buffer boundary because the size estimation does not account for repeated large payloads being fully serialized for each referencing IFD entry. Exploitation requires an attacker to supply a specially crafted PNG image to a system running a vulnerable FFmpeg version, with user interaction (passive) needed to trigger processing of the malicious file (GitHub Advisory, VulnCheck).
Successful exploitation results in deterministic heap corruption, which can cause the FFmpeg process to crash (denial of service) and potentially enables arbitrary code execution in the context of the process handling the malicious image. All three security pillars are affected: confidentiality, integrity, and availability are rated High in the vulnerable system scope. Applications and services that process untrusted PNG or APNG images using FFmpeg — including media transcoding pipelines, web services, and desktop applications — are at risk of compromise or disruption (GitHub Advisory, VulnCheck).
struct library or custom EXIF manipulation scripts can be used to construct the malformed chunk.add_exif_profile_size() underestimates the required buffer. During canonical serialization, png_write_chunk() writes far beyond the allocated heap buffer.ffmpeg, ffprobe, or embedding applications) when processing PNG/APNG files; core dump files generated by FFmpeg.SIGSEGV or SIGABRT when handling PNG/APNG input; error messages referencing PNG encoder or EXIF processing routines.core.*) in FFmpeg working directories.Update FFmpeg to a version that includes the fix from commit b506fafec9a19fcbc2be5271875fd4a63d6615bc, which corrects the size estimation in add_exif_profile_size(). If immediate patching is not feasible, restrict or disable the processing of untrusted PNG/APNG images, or disable PNG/APNG encoding functionality if it is not required by the application. Organizations should audit any media processing pipelines that accept user-supplied image files and apply network-level controls to limit exposure (GitHub Advisory, VulnCheck).
The vulnerability received coverage from The Hacker Wire shortly after disclosure on July 24, 2026, and was noted on Mastodon via the @thehackerwire account (The Hacker Wire). VulnCheck published a dedicated advisory providing technical context and remediation guidance (VulnCheck). Community reaction has been measured, consistent with the absence of active exploitation or a public PoC at the time of disclosure.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."