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 remote attackers to corrupt heap memory by supplying a crafted PNG image with a malicious eXIf chunk. Attackers can craft an eXIf chunk where multiple IFD entries reference the same large value payload, causing canonical serialization to expand the output far beyond the undersized allocation estimated by add_exif_profile_size(), resulting in png_write_chunk() writing tens of thousands of bytes past the buffer boundary, leading to deterministic heap corruption, process crash, and potentially arbitrary code execution.
CVE-2026-66040
Score 8.8 from GitHub Security Advisory (severity: HIGH) published 2026-07-24. a secondary CVSS source baseline 8.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 8.8
- EG Score
- 8.8(high)
- EG Risk
- 44(Track)EG Risk 44/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity88% × 45%Exploitation1% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 1%
- EPSS %ILE
- 43%
- KEV
- Not listed
Published
July 24, 2026
Last Modified
July 24, 2026
Advisory Details (3)
Auto-updated Jul 24, 2026FFmpeg Heap Out-of-Bounds Write via PNG/APNG eXIf Encoder | Advisories | VulnCheck
https://www.vulncheck.com/advisories/ffmpeg-heap-out-of-bounds-write-via-png-apng-exif-encoderavcodec/pngenc: fix overrun caused by exif size discrepancy · b506fafec9 - FFmpeg/FFmpeg - FFmpeg Forgejo
https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/b506fafec9a19fcbc2be5271875fd4a63d6615bc#23786 - avcodec/pngenc: fix overrun caused by exif size discrepancy - FFmpeg/FFmpeg - FFmpeg Forgejo
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23786Vendor Advisories for CVE-2026-66040(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 10× in last 7d / 10× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-26 14:54 UTCEPSS rescore
- 2026-07-26 14:54 UTCEPSS rescore
- 2026-07-26 14:54 UTCEG score recompute
- 2026-07-26 14:54 UTCGHSA enrichment
- 2026-07-26 02:55 UTCEG score recompute
- 2026-07-26 02:55 UTCGHSA enrichment
- 2026-07-25 14:18 UTCEPSS rescore
- 2026-07-25 14:18 UTCEPSS rescore
- 2026-07-24 20:12 UTCEG score recompute
- 2026-07-24 20:12 UTCMITRE cvelistV5first tracked
Related CVEs(same CWE)
Same CWE
10 shownCWE-122
Frequently asked(5)
What is CVE-2026-66040?
When was CVE-2026-66040 disclosed?
Is CVE-2026-66040 actively exploited?
What is the CVSS score of CVE-2026-66040?
How do I remediate CVE-2026-66040?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2026-66040
Is Your Infrastructure Affected by CVE-2026-66040?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.