Description
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.
Published: 2026-07-24
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

FFmpeg versions up to 8.1.2 include a heap out‑of‑bounds write in the native PNG and APNG encoders. By crafting a PNG image with a malicious eXIf chunk that contains multiple IFD entries referencing a large payload, the encoder allocates too small a buffer. When png_write_chunk() expands the output, it writes tens of thousands of bytes beyond the allocated space, corrupting heap memory deterministically. The resulting corruption can cause the process to crash and, if exploitation succeeds, arbitrary code execution on the host.

Affected Systems

The affected vendor is FFmpeg. All FFmpeg releases through version 8.1.2 are impacted. The vulnerability was fixed by commit b506faf, so FFmpeg 8.1.3 and newer are not vulnerable.

Risk and Exploitability

The CVSS score of 8.7 classifies this as high severity. The EPSS score of less than 1% indicates a very low probability of exploitation in the wild, and the vulnerability is not currently listed in CISA’s KEV catalog. The attack can be carried out remotely by supplying a malicious PNG image to ffmpeg’s encoder; no special privileges are required beyond the execution of ffmpeg on the target system.

Generated by OpenCVE AI on August 2, 2026 at 13:53 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the FFmpeg update that includes commit b506faf (for example, upgrade to version 8.1.3 or later).
  • If an immediate upgrade is not possible, block or quarantine any untrusted PNG/APNG files from being processed by ffmpeg, thereby preventing the vulnerability from being triggered.
  • When processing PNG files is unavoidable, validate or sanitize any user‑supplied eXIf data to ensure that it does not contain malformed or oversized IFD entries before passing it to the encoder.

Generated by OpenCVE AI on August 2, 2026 at 13:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 31 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

threat_severity

Important


Tue, 28 Jul 2026 01:30:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:ffmpeg:ffmpeg:*:*:*:*:*:*:*:*

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sat, 25 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
First Time appeared Ffmpeg
Ffmpeg ffmpeg
Vendors & Products Ffmpeg
Ffmpeg ffmpeg

Fri, 24 Jul 2026 20:15:00 +0000

Type Values Removed Values Added
Description 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.
Title FFmpeg Heap Out-of-Bounds Write via PNG/APNG eXIf Encoder
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-29T03:55:38.351Z

Reserved: 2026-07-23T20:45:17.817Z

Link: CVE-2026-66040

cve-icon Vulnrichment

Updated: 2026-07-27T14:33:49.162Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-24T20:18:21.063

Modified: 2026-08-07T00:35:29.773

Link: CVE-2026-66040

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-24T19:46:25Z

Links: CVE-2026-66040 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T14:00:05Z

Weaknesses