CVE-2026-50142
Received Received - Intake

Heap Overflow in libheif Image Decoder

Vulnerability report for CVE-2026-50142, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-18

Last updated on: 2026-08-19

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-18
Last Modified
2026-08-19
Generated
2026-09-08
AI Q&A
2026-08-19
EPSS Evaluated
2026-09-07
NVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
structural_heif libheif From 1.19.0 (inc) to 1.23.0 (inc)
structural_heif libheif 1.23.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-770 The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
CWE-190 The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in libheif allows an attacker to cause unbounded heap allocation by providing a crafted HEIF sequence with the msf1 brand. The issue occurs because the parser does not properly limit the number of samples, leading to excessive memory consumption.

Detection Guidance

To detect this vulnerability, check the version of libheif installed on your system. Run: heif-info --version or dpkg -l libheif1. If the version is between 1.19.0 and 1.23.0, the system is vulnerable. Monitor for crashes or high memory usage when processing HEIF/AVIF files.

Impact Analysis

An attacker could exploit this to crash or stall your application by consuming excessive memory, potentially leading to denial-of-service conditions. Systems processing untrusted HEIF files are most at risk.

Compliance Impact

This vulnerability could lead to service disruptions or crashes, which may violate availability requirements in GDPR or HIPAA. Organizations must ensure affected systems are patched to maintain compliance.

Mitigation Strategies

Upgrade libheif to version 1.23.0 or later immediately. If upgrading is not possible, avoid processing untrusted HEIF/AVIF files until patched. Implement network monitoring to block or quarantine suspicious files.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-50142. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart