libheif: Wrapped icef compressed-unit range check causes out-of-bounds read in uncompressed HEIF decoder
libheif is a HEIF and AVIF file format decoder and encoder. Prior to version 1.22.1, the uncompressed HEIF decoder validates explicit icef compressed-unit offsets using unit_offset + unit_size. Because the addition can wrap, a crafted HEIF file can pass the range check and then construct a vector from iterators outside the compressed item buffer, producing an out-of-bounds heap read and crash. Version 1.22.1 patches the issue.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-49271
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 00:55 UTC · Revision 1
Source evidence
libheif: Wrapped icef compressed-unit range check causes out-of-bounds read in uncompressed HEIF decoder
core-osv · Original sourcePublished 19 Jun 2026, 17:16 UTC
libheif is a HEIF and AVIF file format decoder and encoder. Prior to version 1.22.1, the uncompressed HEIF decoder validates explicit icef compressed-unit offsets using unit_offset + unit_size. Because the addition can wrap, a crafted HEIF file can pass the range check and then construct a vector from iterators outside the compressed item buffer, producing an out-of-bounds heap read and crash. Version 1.22.1 patches the issue.
osv:CVE-2026-49271
Complete source record
{
"id": "b192c1cdc9fa07a427608bcf5ef5368d255d7c4373cdba89f8291fd01802bed9",
"url": "https://osv.dev/vulnerability/CVE-2026-49271",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "libheif: Wrapped icef compressed-unit range check causes out-of-bounds read in uncompressed HEIF decoder",
"summary": "libheif is a HEIF and AVIF file format decoder and encoder. Prior to version 1.22.1, the uncompressed HEIF decoder validates explicit icef compressed-unit offsets using unit_offset + unit_size. Because the addition can wrap, a crafted HEIF file can pass the range check and then construct a vector from iterators outside the compressed item buffer, producing an out-of-bounds heap read and crash. Version 1.22.1 patches the issue.",
"evidence": "osv:CVE-2026-49271",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-49271",
"aliases": [
"CVE-2026-49271",
"GHSA-r7qj-cg5r-r6vf"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/strukturag/libheif",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "8027b0a04066b13d07f0e3b9dc8ed9f40530c51d"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.22.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"cpe": "cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.22.1"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v1.22.0",
"v1.21.2",
"v1.21.1",
"v1.21.0",
"v1.20.1",
"v1.20.0",
"v1.19.5",
"v1.19.4",
"v1.19.3",
"v1.19.2",
"v1.19.1",
"v1.19.0",
"v1.18.0",
"v1.18.0-rc1",
"v1.17.6",
"v1.17.5",
"v1.17.4",
"v1.17.3",
"v1.17.2",
"v1.17.1",
"v1.17.0",
"v1.16.2",
"v1.16.1",
"v1.16.0",
"v1.15.2",
"v1.15.1",
"v1.15.0",
"v1.14.2",
"v1.14.1",
"v1.14.0",
"v1.13.0",
"v1.12.0",
"v1.11.0",
"v1.10.0",
"v1.9.1",
"v1.9.0",
"v1.8.0",
"v1.7.0",
"v1.3.2",
"v1.3.1",
"v1.3.0",
"v1.2.0",
"v1.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-49271.json"
}
}
],
"modified": "2026-10-28T02:30:41.078673637Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49271.json",
"https://github.com/strukturag/libheif/security/advisories/GHSA-r7qj-cg5r-r6vf",
"https://nvd.nist.gov/vuln/detail/CVE-2026-49271"
],
"provider_metadata": {
"cwe_ids": [
"CWE-125"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49271.json"
}
},
"related_cves": [
{
"value": "CVE-2026-49271",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 508758,
"published_at": "2026-06-19T17:16:20.157+00:00"
}