CVE-2025-68431
libheif has Potential Heap Buffer Over-Read
Reported by github_m · Published December 29, 2025
libheif is an HEIF and AVIF file format decoder and encoder. Prior to version 1.21.0, a crafted HEIF that exercises the overlay image item path triggers a heap buffer over-read in `HeifPixelImage::overlay()`. The function computes a negative row length (likely from an unclipped overlay rectangle or invalid offsets), which then underflows when converted to `size_t` and is passed to `memcpy`, causing a very large read past the end of the source plane and a crash. Version 1.21.0 contains a patch. As a workaround, avoid decoding images using `iovl` overlay boxes.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| libheif | Alpine | 1.21.2-r0, 1.19.8-r1 |
| libheif | Amazon Linux | 1.19.8-1.amzn2023.0.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| strukturag | libheif | < 1.21.0 |
| alpine | libheif | 0, 0 |
| amazon:2023 | libheif | 0 |
| amazon:2023 | libheif-devel | 0 |
| amazon:2023 | heif-pixbuf-loader | 0 |
| amazon:2023 | libheif-tools | 0 |
| strukturag | libheif | 0 |
Timeline
- Dec 29, 2025 CVE Published
- Dec 30, 2025 EPSS Score (30 in total, the first dated here)
- Jan 2, 2026 PoC Published (5 in total, the first dated here)
- Feb 25, 2026 CVE Updated
- Mar 26, 2026 Coalition ESS Score (2 in total, the first dated here)
- Sep 29, 2026 Security Advisory
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-68431
vulnetix vdb fixes CVE-2025-68431
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-68431/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart