CVE-2026-62377 libheif: Reachable assertion in HeifContext::get_track() aborts on a valid-but-empty HEIF sequence file (context.cc:2110)
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- UbuntuDebian
Description
libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted HEIF sequence accepted by heif_context_read_from_memory() can leave the context with no registered sequence tracks and crash when heif_context_get_track(ctx, 0) is called. HeifContext::get_track() in libheif/context.cc executes assert(has_sequence()) before its normal error handling, so assert-enabled builds abort instead of allowing the public wrapper in libheif/api/libheif/heif_sequences.cc to return null. In release builds, removing the assertion lets the track_id zero path dereference m_tracks.begin()->second on an empty map, which is undefined behavior and typically crashes. The issue is reachable through documented public APIs after parsing attacker-controlled bytes. This issue is fixed in version 1.23.1.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/libheif(Debian 14) | < 1.23.1-1; = 1.19.8-1; = 1.20.1-1; = 1.20.2-1 +5 more | 1.23.1-1 | Fixed |
| ubuntu/libheif(Ubuntu 26.04) | < 1.21.2-3ubuntu0.5 | 1.21.2-3ubuntu0.5 | Fixed |
| strukturag libheif | = < 1.23.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| strukturag libheif | = < 1.23.1 | No fix listed |
| debian/libheif(Debian:14) | < 1.23.1-1 | 1.23.1-1 |
| debian/libheif(Debian:14) | = 1.19.8-1 | No fix listed |
| debian/libheif(Debian:14) | = 1.20.1-1 | No fix listed |
| debian/libheif(Debian:14) | = 1.20.2-1 | No fix listed |
| debian/libheif(Debian:14) | = 1.20.2-2 | No fix listed |
| debian/libheif(Debian:14) | = 1.21.2-1 | No fix listed |
| debian/libheif(Debian:14) | = 1.21.2-2 | No fix listed |
| debian/libheif(Debian:14) | = 1.21.2-3 | No fix listed |
| debian/libheif(Debian:14) | = 1.21.2-4 | No fix listed |
| ubuntu/libheif(Ubuntu:26.04) | < 1.21.2-3ubuntu0.5 | 1.21.2-3ubuntu0.5 |
References
- https://github.com/strukturag/libheif/security/advisories/GHSA-9ww4-9v47-m7pj
- https://github.com/strukturag/libheif/issues/1844
- https://github.com/strukturag/libheif/commit/e1a0bc1c1ae74f8075eaca30a1cdb2b9bee698d3
- https://github.com/strukturag/libheif/releases/tag/v1.23.1
- Debian Security Tracker CVE-2026-62377 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-8774-1 vendor-advisory
- www.cve.org