{"id":"CVE-2026-50142","published":"2026-08-18T21:18:03Z","modified":"2026-08-19T18:51:48Z","title":"libheif: unbounded heap allocation in HEIF sequence parser (stsz fixed-size mode missing bound check)","vendor":"strukturag","product":"libheif","tier":"tail","description":{"text":"libheif 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00655,"percentile":0.46159,"provenance":"source"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"},{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"references":[{"url":"https://github.com/strukturag/libheif/security/advisories/GHSA-jvmp-j3cw-84mh","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/strukturag/libheif/commit/a6caa38f7a70d66dc9caec2a7bfe20935b32c622","tags":["x_refsource_MISC"]},{"url":"https://github.com/strukturag/libheif/releases/tag/v1.23.0","tags":["x_refsource_MISC"]}],"priority":{"score":19.5,"factors":[{"name":"EPSS percentile","points":9.23},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-06-04","earliestUrl":"https://github.com/MuhammedHussein17/libheif-cve-2026-50142","repos":[{"name":"MuhammedHussein17/libheif-cve-2026-50142","url":"https://github.com/MuhammedHussein17/libheif-cve-2026-50142","stars":0,"created":"2026-06-04"}]},"first":{"date":"2026-06-04","source":"PoC-in-GitHub","url":"https://github.com/MuhammedHussein17/libheif-cve-2026-50142"},"provenance":"source"},"vendorSlug":"strukturag","affectedVersions":[{"vendor":"strukturag","product":"libheif","versions":[">= 1.19.0, < 1.23.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-08-19T18:51:41.872528Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-62187","exploited":false,"provenance":"source"}}