CVE-2026-62377: libheif: Reachable assertion in HeifContext::get_track() aborts on a valid-but-empty HEIF sequence file (context.cc:2110)

Published Aug 18, 2026
·
Updated

libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted HEIF sequence accepted by heifcontextreadfrommemory() can leave the context with no registered sequence tracks and crash when heifcontextgettrack(ctx, 0) is called. HeifContext::gettrack() in libheif/context.cc executes assert(hassequence()) before its normal error handling, so assert-enabled builds abort instead of allowing the public wrapper in libheif/api/libheif/heifsequences.cc to return null. In release builds, removing the assertion lets the trackid zero path dereference mtracks.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.

Affected Software

2 affected components
libheif libheif<=1.23.0
libheif libheif=1.23.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade libheif to a version that resolves this vulnerability.

    Fixed in 1.23.1

Event History

Aug 18, 2026
CVE Published
via MITRE·09:22 PM
Data Sourced
via MITRE·09:22 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are realistically exposed?

Applications using libheif 1.23.0 or earlier are exposed if they parse attacker-controlled HEIF sequence data with heif_context_read_from_memory() and subsequently call heif_context_get_track(ctx, 0). The issue is reachable through documented public APIs and does not require attacker privileges, but it does require user interaction according to the supplied severity vector.

2

What conditions are needed to trigger the crash?

A crafted but valid empty HEIF sequence file can cause the parsed context to contain no registered sequence tracks. Calling heif_context_get_track(ctx, 0) afterward triggers an assertion abort in assertion-enabled builds; release builds can dereference an empty track map and typically crash.

3

What is the remediation?

Update libheif to version 1.23.1, which fixes the issue. The provided information does not specify an alternative mitigation for deployments that cannot yet update.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203