libheif — security advisory
libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.
- Products
- libheif
- Affected versions
- 1.19.8-1, 1.20.1-1, 1.20.2-1, 1.20.2-2, 1.21.2-1, 1.21.2-2, 1.21.2-3, 1.21.2-4
- Fixed versions
- 1.23.1-1
- CVEs
- CVE-2026-62291
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 23:04 UTC · Revision 1
Source evidence
libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.
osv:DEBIAN-CVE-2026-62291
libheif
Fixed versions: 1.23.1-1
Complete source record
{
"id": "034d973034208ed49fb79ac08f07927529cce2ef6ad03d7f59e970dbc7e06763",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-62291",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-62291",
"summary": "libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.",
"evidence": "osv:DEBIAN-CVE-2026-62291",
"products": [
{
"name": {
"value": "libheif",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.23.1-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "1.19.8-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.20.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.20.2-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.20.2-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.21.2-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.21.2-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.21.2-3",
"evidence": "/affected/0/versions"
},
{
"value": "1.21.2-4",
"evidence": "/affected/0/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2026-62291",
"aliases": [
"DEBIAN-CVE-2026-62291"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.23.1-1"
}
]
}
],
"package": {
"name": "libheif",
"purl": "pkg:deb/debian/libheif?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"1.19.8-1",
"1.20.1-1",
"1.20.2-1",
"1.20.2-2",
"1.21.2-1",
"1.21.2-2",
"1.21.2-3",
"1.21.2-4"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-62291.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-23T17:47:34.257455736Z",
"provider": "osv",
"upstream": [
"CVE-2026-62291"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-62291"
]
},
"related_cves": [
{
"value": "CVE-2026-62291",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 417686,
"published_at": "2026-08-18T22:17:02.877+00:00"
}