Skip to content
OpenAdvisories
High · 8.8 CVE-2026-66040 EUVD-2026-48742GHSA-6vcg-882j-82v5

FFmpeg Heap Out-of-Bounds Write via PNG/APNG eXIf Encoder

Published Jul 24, 2026 · Updated Jul 29, 2026 · Assigned by VulnCheck

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.

Affected products

VendorProductAffectedFixed
FFmpeg FFmpeg ≤ 8.1.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ffmpeg 7:9.0.2-1 —
Debian 13 ffmpeg No fix yet —
Debian 12 ffmpeg No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 ffmpeg No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 14.04 LTS libav No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling ffmpeg-7 No fix yet —
Wolfi rolling ffmpeg-8.1 8.1.3-r0 —

Advisories 1

References