CVE-2026-32738: CWE-125: Out-of-bounds Read in strukturag libheif
CVE-2026-32738 is an out-of-bounds read vulnerability in strukturag libheif versions 1. 21. 2 and below. A crafted HEIF file with samples_per_chunk=0 triggers an unsigned integer underflow, causing all samples to map to an empty chunk. Accessing any sample then causes a segmentation fault due to reading from an empty vector. The file parses without error, but crashes on first frame access. This issue is fixed in libheif version 1. 22. 0.
AI Analysis
Technical Summary
The vulnerability in libheif (<=1.21.2) arises from an unsigned integer underflow in the Chunk constructor when processing a specially crafted HEIF file with samples_per_chunk=0 in the stsc box. This underflow sets m_last_sample to UINT32_MAX, mapping all samples to an empty chunk. Subsequent access to any sample causes an out-of-bounds read from an empty std::vector, resulting in a guaranteed segmentation fault (null-page read) and denial of service. The malformed file parses successfully without error, but the crash occurs upon first frame access. The issue is resolved in libheif version 1.22.0.
Potential Impact
This vulnerability causes a denial of service via application crash when processing a maliciously crafted HEIF file. There is no impact on confidentiality or integrity. The crash is triggered on first frame access after successful parsing, leading to a guaranteed segmentation fault. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade libheif to version 1.22.0 or later, where this vulnerability is fixed. Versions prior to 1.22.0 are vulnerable. No other mitigation or workaround is documented. Patch status is confirmed fixed in the vendor's version 1.22.0 release.
CVE-2026-32738: CWE-125: Out-of-bounds Read in strukturag libheif
Description
CVE-2026-32738 is an out-of-bounds read vulnerability in strukturag libheif versions 1. 21. 2 and below. A crafted HEIF file with samples_per_chunk=0 triggers an unsigned integer underflow, causing all samples to map to an empty chunk. Accessing any sample then causes a segmentation fault due to reading from an empty vector. The file parses without error, but crashes on first frame access. This issue is fixed in libheif version 1. 22. 0.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in libheif (<=1.21.2) arises from an unsigned integer underflow in the Chunk constructor when processing a specially crafted HEIF file with samples_per_chunk=0 in the stsc box. This underflow sets m_last_sample to UINT32_MAX, mapping all samples to an empty chunk. Subsequent access to any sample causes an out-of-bounds read from an empty std::vector, resulting in a guaranteed segmentation fault (null-page read) and denial of service. The malformed file parses successfully without error, but the crash occurs upon first frame access. The issue is resolved in libheif version 1.22.0.
Potential Impact
This vulnerability causes a denial of service via application crash when processing a maliciously crafted HEIF file. There is no impact on confidentiality or integrity. The crash is triggered on first frame access after successful parsing, leading to a guaranteed segmentation fault. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade libheif to version 1.22.0 or later, where this vulnerability is fixed. Versions prior to 1.22.0 are vulnerable. No other mitigation or workaround is documented. Patch status is confirmed fixed in the vendor's version 1.22.0 release.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-13T15:02:00.628Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0cb784ba1db47362cbb38b
Added to database: 5/19/2026, 7:18:28 PM
Last enriched: 5/19/2026, 7:33:55 PM
Last updated: 5/20/2026, 8:14:53 AM
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.