CVE-2026-50142

NameCVE-2026-50142
Descriptionlibheif is a HEIF and AVIF file format decoder and encoder. From 1.19.0 until 1.23.0, a crafted HEIF sequence accepted by heif_context_read_from_memory() with the msf1 sequence brand can cause unbounded heap allocation. In libheif/sequences/seq_boxes.cc, Box_stsz::parse() applies max_sequence_frames only to variable-size samples, so fixed-size mode accepts an attacker-controlled sample_count without a bound. In libheif/sequences/track.cc, Track::load() also adds current_sample_idx and samples_per_chunk in 32-bit arithmetic, allowing the consistency check to be bypassed by wraparound. The resulting values reach the Chunk::Chunk() allocation path, which can consume gigabytes of memory and crash or stall the process through memory exhaustion. This issue is fixed in version 1.23.0.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
libheif (PTS)bullseye1.11.0-1vulnerable
bullseye (security)1.11.0-1+deb11u2vulnerable
bookworm, bookworm (security)1.15.1-1+deb12u1vulnerable
trixie1.19.8-1fixed
trixie (security)1.19.8-1+deb13u1fixed
forky1.23.1-1fixed
sid1.23.2-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libheifsourcetrixie(not affected)
libheifsource(unstable)1.23.1-1

Notes

[trixie] - libheif <not-affected> (Vulnerable code introduced in 1.20.0)
https://github.com/strukturag/libheif/security/advisories/GHSA-jvmp-j3cw-84mh

Search for package or bug name: Reporting problems