UBUNTU-CVE-2026-66040 (CVE-2026-66040)
Vulnerability from osv_ubuntu – Published: 2026-07-24 20:18 – Updated: 2026-08-21 18:05 – Source websiteFFmpeg 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": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libav-tools",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavcodec-extra",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavcodec-extra-54",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavcodec54",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavdevice-extra-53",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavdevice53",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavfilter-extra-3",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavfilter3",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavformat-extra-54",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavformat54",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavresample1",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavutil-extra-52",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libavutil52",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libswscale-extra-2",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
},
{
"binary_name": "libswscale2",
"binary_version": "6:9.20-0ubuntu0.14.04.1+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "libav",
"purl": "pkg:deb/ubuntu/libav@6:9.20-0ubuntu0.14.04.1+esm1?arch=source\u0026distro=esm-infra-legacy/trusty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"6:0.8.7-1ubuntu2",
"6:9.10-1ubuntu1",
"6:9.10-1ubuntu2",
"6:9.10-1ubuntu5",
"6:9.10-1ubuntu6",
"6:9.10-1ubuntu7",
"6:9.11-2ubuntu1",
"6:9.11-2ubuntu2",
"6:9.13-0ubuntu0.14.04.1",
"6:9.14-0ubuntu0.14.04.1",
"6:9.16-0ubuntu0.14.04.1",
"6:9.18-0ubuntu0.14.04.1",
"6:9.20-0ubuntu0.14.04.1",
"6:9.20-0ubuntu0.14.04.1+esm1"
]
}
],
"aliases": [],
"details": "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.",
"id": "UBUNTU-CVE-2026-66040",
"modified": "2026-08-21T18:05:41Z",
"published": "2026-07-24T20:18:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2026-66040"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-66040"
},
{
"type": "REPORT",
"url": "https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23786"
},
{
"type": "REPORT",
"url": "https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/b506fafec9a19fcbc2be5271875fd4a63d6615bc"
},
{
"type": "REPORT",
"url": "https://www.vulncheck.com/advisories/ffmpeg-heap-out-of-bounds-write-via-png-apng-exif-encoder"
}
],
"related": [],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "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",
"type": "CVSS_V4"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2026-66040"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.