CVE-2026-3949
Out-of-Bounds Read in strukturag libheif HEIF Parser
Publication date: 2026-03-11
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| strukturag | libheif | to 1.21.2 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-125 | The product reads data past the end, or before the beginning, of the intended buffer. |
| CWE-119 | The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': "CVE-2026-3949 is an out-of-bounds read vulnerability in the strukturag libheif library, specifically in the function vvdec_push_data2 within the file libheif/plugins/decoder_vvdec.cc. The vulnerability arises because the function improperly validates the length of Network Abstraction Layer (NAL) units when parsing HEIF files. It reads a 32-bit size value from the input buffer without ensuring that enough data remains, then attempts to copy that many bytes into a vector without verifying the buffer's actual size. This can cause the function to read beyond the allocated buffer, leading to a heap-buffer-overflow and potential memory corruption."}, {'type': 'paragraph', 'content': 'The vulnerability requires local access to exploit and can be triggered by crafting malicious HEIF files with incorrect NAL unit size fields. It has been publicly disclosed with proof-of-concept exploits available. The issue was fixed by a patch that adds proper boundary checks to ensure the size values do not exceed the available data.'}] [2, 4, 5, 6]
How can this vulnerability impact me? :
This vulnerability can impact you by causing the libheif library to perform out-of-bounds reads when processing specially crafted HEIF image files. This can lead to heap-buffer-overflows, which may cause application crashes or memory corruption.
While the vulnerability does not directly affect confidentiality or integrity, it impacts the availability of the software by potentially causing denial-of-service conditions through crashes. Additionally, memory corruption could be leveraged in more complex attacks, although no direct exploitation beyond crashes is confirmed.
The attack requires local access and is considered easy to perform, with publicly available proof-of-concept exploits. Therefore, if you use libheif versions up to 1.21.2 with the vulnerable vvdec decoder plugin, you should apply the patch to mitigate these risks.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': "This vulnerability is a local out-of-bounds read in the libheif library's vvdec decoder plugin, triggered by malformed HEIF files with incorrect NAL unit sizes. Detection involves identifying attempts to process such malicious HEIF files locally."}, {'type': 'paragraph', 'content': 'Since the vulnerability requires local access and malformed HEIF files, detection can be performed by monitoring for crashes or abnormal behavior in applications using libheif, especially when decoding HEIF images.'}, {'type': 'paragraph', 'content': 'You can use the libheif command line tools to inspect HEIF files for anomalies. For example, using `heif-info` to display file structure or `heif-dec` to decode images might reveal problematic files if errors or crashes occur.'}, {'type': 'paragraph', 'content': 'No specific commands for network detection are provided in the resources, as the attack is local and triggered by crafted files rather than network traffic.'}] [1]
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to apply the official patch that fixes the vulnerability. The patch identified by commit b97c8b5f198b27f375127cd597a35f2113544d03 adds proper boundary checks in the vvdec_push_data2 function to prevent out-of-bounds reads.
Updating libheif to a version that includes this patch (post version 1.21.2) is strongly recommended.
Until patched, avoid processing untrusted or suspicious HEIF files locally, as the exploit requires local file input.
Monitor for updates from the libheif project and apply security updates promptly.