USN-8774-1: libheif vulnerabilities
Ubuntu patches libheif image-parsing flaws allowing denial of service or arbitrary code execution (CVE-2026-62291, CVE-2026-62377).
Reachable assertion / empty-map crash (DoS) in libheif HEIF sequence handling
libheif, a widely used HEIF/AVIF decoder and encoder library, mishandles crafted HEIF sequences that are accepted by heif_context_read_from_memory() but contain no registered sequence tracks. A subsequent call to heif_context_get_track(ctx, 0) reaches HeifContext::get_track() in context.cc, where assert(has_sequence()) executes before normal error handling, so assert-enabled builds abort instead of letting the wrapper in heif_sequences.cc return null; in release builds the track_id-zero path dereferences m_tracks.begin()->second on an empty map, which is undefined behavior and typically crashes the process. An attacker who can supply a malicious HEIF/AVIF file to an application using these documented public APIs can therefore cause a denial of service (CVSS C:N/I:N/A:L, with user interaction required to open the file). Any application, service, or distribution package linking libheif 1.23.0 or earlier and parsing untrusted media through these APIs is affected; Ubuntu has issued USN-8774-1 for its libheif packages. There is no known public PoC, the issue is not in CISA KEV, and EPSS estimates only a ~0.3% chance of exploitation in the next 30 days.
What to do: Upgrade libheif to version 1.23.1 or later, and on Ubuntu apply the package updates from USN-8774-1; rebuild statically linked applications against the patched library. Applications using the sequence APIs should additionally validate that a context contains tracks before calling heif_context_get_track(), and treat untrusted HEIF/AVIF inputs (e.g., uploads, thumbnails) as suspect until patched.
| Product | Affected |
|---|---|
| strukturag (libheif project) libheif | 1.23.0 and earlier (fixed in 1.23.1) |
| Canonical Ubuntu libheif packages | affected packages per USN-8774-1 (see the notice for fixed package versions) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
Ubuntu patches libheif image-parsing flaws allowing denial of service or arbitrary code execution (CVE-2026-62291, CVE-2026-62377).
Today 1.3K readers · 2.1K views · 1.6K reads · all time 160K views