Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-66040— FFmpeg Heap Out-of-Bounds Write via PNG/APNG eXIf Encoder

Quick assessment

Affected
FFmpeg FFmpeg
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

FFmpeg是FFmpeg组织开源的一套可录制、转换以及流化音视频的完整解决方案。 FFmpeg 8.1.2及之前版本存在缓冲区错误漏洞,该漏洞源于本地PNG和APNG编码器中的堆越界写入漏洞,允许远程攻击者通过提供特制的带有恶意eXIf块的PNG图像来损坏堆内存,导致进程崩溃并可能执行任意代码。

CVSS 8.8 · High EPSS 0.78% · P54

Affected Version Matrix 2

VendorProduct Version RangeStatus
FFmpeg FFmpeg ≤ 8.1.2 affected
b506fafec9a19fcbc2be5271875fd4a63d6615bc unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-66040

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
FFmpeg Heap Out-of-Bounds Write via PNG/APNG eXIf Encoder
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
堆缓冲区溢出
Source: CVE Program / CVE List V5
Vulnerability Title
FFmpeg 缓冲区错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
FFmpeg是FFmpeg组织开源的一套可录制、转换以及流化音视频的完整解决方案。 FFmpeg 8.1.2及之前版本存在缓冲区错误漏洞,该漏洞源于本地PNG和APNG编码器中的堆越界写入漏洞,允许远程攻击者通过提供特制的带有恶意eXIf块的PNG图像来损坏堆内存,导致进程崩溃并可能执行任意代码。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
FFmpeg FFmpeg 0 ~ 8.1.2 -

II. Public POCs for CVE-2026-66040

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-66040

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-66040 (2)

Vendor Advisories for CVE-2026-66040 (1)

Same Patch Batch · FFmpeg · 2026-07-24 · 6 CVEs total

CVE-2026-66036 8.8 HIGH FFmpeg Heap Out-of-Bounds Write in vf_hqdn3d Filter
CVE-2026-66041 8.8 HIGH FFmpeg 7.0 - 8.1.2 Heap Out-of-Bounds Write via vf_quirc Filter
CVE-2026-66039 8.8 HIGH FFmpeg MACE6 Audio Decoder Heap Out-of-Bounds Write via CAF File
CVE-2026-66037 6.5 MEDIUM FFmpeg IAMF Demuxer Uncontrolled Resource Consumption via mix_presentation_obu()
CVE-2026-66038 6.5 MEDIUM FFmpeg LCL/ZLIB Video Decoder Information Disclosure via lcldec.c

IV. Related Vulnerabilities

V. Comments for CVE-2026-66040

No comments yet


Leave a comment