Skip to content
NewA calmer, faster ZeroHour
Vulnerability1 · 1 read

CVE-2026-62377

Reachable assertion / empty-map crash (DoS) in libheif HEIF sequence handling

CVSS 3.1
4.3 medium
EPSS
<1%p25
Published
·
Modified
Analyze CVE-2026-62377 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

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.

ProductAffected
strukturag (libheif project) libheif1.23.0 and earlier (fixed in 1.23.1)
Canonical Ubuntu libheif packagesaffected packages per USN-8774-1 (see the notice for fixed package versions)
Estimated exposure
massmillions of Linux installations ship the library (packaged in Ubuntu per USN-8774-1 and common in image/thumbnailing stacks), though only apps parsing… — Ubuntu's security notice confirms libheif is packaged in mainstream distributions whose combined install bases run to tens of millions, but the crash requires an application to call the sequence-track APIs on attacker-controlled files, so…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

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.

Weakness
CWE-617, CWE-908
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

In the news

1 story