Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 78%

CVE-2026-41071: CWE-125: Out-of-bounds Read in strukturag libheif

0
Medium
VulnerabilityCVE-2026-41071cvecve-2026-41071cwe-125
Published: 05/22/2026 (05/22/2026, 20:59:09 UTC)
Source: CVE Database V5
Vendor/Project: strukturag
Product: libheif

Description

libheif is a HEIF and AVIF file format decoder and encoder. In versions 1.21.2 and prior, a crafted HEIF sequence file where the saiz box declares more samples than actually exist in the track's chunk table causes a heap-buffer-overflow (out-of-bounds read) in the SampleAuxInfoReader constructor. The SampleAuxInfoReader constructor iterates over saiz->get_num_samples() samples but doesn't validate that this count is consistent with the number of chunks in the chunks vector. When saiz declares more samples than the chunks cover, the loop increments current_chunk past chunks.size(), causing an out-of-bounds read on the chunks vector. The vulnerability is triggered during file parsing (heif_context_read_from_file) without any additional user interaction. Any application using libheif to open untrusted HEIF files is affected. This issue has been fixed in version 1.22.0.

CVSS v4.0

Score 5.1medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
Low
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

Affected software

GitHub Actionsmore threats →ai
strukturag/libheif
pkg:github/strukturag/libheif
Affected versions
<1.22.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/30/2026, 20:20:29 UTC

Technical Analysis

The vulnerability in libheif (CVE-2026-41071) arises from improper validation of sample counts in the saiz box of HEIF files. Specifically, the SampleAuxInfoReader constructor iterates over the number of samples declared by saiz without verifying that this number matches the actual number of chunks available. When saiz declares more samples than the chunks vector contains, the code reads out-of-bounds, causing a heap-buffer-overflow. This occurs during the heif_context_read_from_file function call when parsing a crafted HEIF file. Applications using libheif to process untrusted HEIF files are affected. The issue is resolved in libheif version 1.22.0.

Potential Impact

An attacker can cause a heap-buffer-overflow by supplying a specially crafted HEIF file, potentially leading to application crashes or other undefined behavior. The vulnerability requires no privileges and no user interaction beyond opening the malicious file. The CVSS 4.0 base score is 5.1 (medium severity), reflecting network attack vector, low complexity, no privileges required, and low impact on confidentiality, integrity, and availability.

Mitigation Recommendations

This vulnerability has been fixed in libheif version 1.22.0. Users and developers should upgrade to version 1.22.0 or later to remediate this issue. Since this is a library vulnerability, applications using libheif should update their dependencies accordingly. No vendor advisory content is provided to indicate alternative mitigations or that no action is required.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-16T16:43:03.174Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a10cacbe1370fbb48572382

Added to database: 05/22/2026, 21:29:47 UTC

Last enriched: 05/30/2026, 20:20:29 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 139

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses