Vulnerability · CVE-2026-32741
libheif is a HEIF and AVIF file format decoder and encoder.
Published May 19, 2026 · catalog updated Jul 24, 2026 · libheif is a HEIF
Check if you run it
No confirmed exploitation is on record for CVE-2026-32741. EPSS is 0.45%. Act only if a listed version of libheif is a HEIF is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (libheif is a HEIF).
- No version range is stored. A customer cannot check an installed version against this record.
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- High7.1
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.45%
- Remediation
- Advisory link
- Affected products
- See sources for product scope
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and below contain a heap buffer overflow in MaskImageCodec::decode_mask_image(). When decoding a HEIF file containing a mask image (mski), the function copies the full iloc extent data into a pixel buffer using memcpy(dst, data.data(), data.size()). The copy length data.size() is determined by the iloc extent in the file (attacker-controlled), while the destination buffer is sized based on the declared image dimensions. Because no upper-bound check exists on the data length, a crafted file whose iloc extent exceeds the pixel buffer allocation overflows the heap. The vulnerable single-memcpy branch is reached when the mskC property specifies bits_per_pixel = 8 and the ispe property declares an even width ≥ 64 (so that stride == width), with no changes to default security limits or external codec plugins required. This issue has been fixed in version 1.22.0.
No affected version ranges are stored yet. Use the vendor advisory before you decide this record does not apply.
How to fix CVE-2026-32741
Recommended remediation
A patch or advisory reference is linked. Open the original publisher for availability by product version.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-32741. EPSS is 0.45%. Act only if a listed version of libheif is a HEIF is installed.
Which versions are affected?
Affected version ranges are not on this record. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-120: Classic Buffer Overflow; CWE-122: Heap-based Buffer Overflow. EPSS 0.45%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
May 19, 2026 · NIST NVD
Detected
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and below contain a heap buffer overflow in MaskImageCodec::decode_mask_image(). When decoding a HEIF file containing a mask image (mski), the function copies the full iloc extent data into a pixel buffer using memcpy(dst, data.data(), data.size()). The copy length data.size() is determined by the iloc extent in the file (
Jul 24, 2026 · NIST NVD
Updated
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and below contain a heap buffer overflow in MaskImageCodec::decode_mask_image(). When decoding a HEIF file containing a mask image (mski), the function copies the full iloc extent data into a pixel buffer using memcpy(dst, data.data(), data.size()). The copy length data.size() is determined by the iloc extent in the file (
Sources
- CVE.orgVulnerability recordCVE-2026-32741
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-32741
30-day exploitation probability 0.4%
first.org - NIST NVDVulnerability recordCVE-2026-32741
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and below contain a heap buffer overflow in MaskImageCodec::decode_mask_image(). When decoding a HEIF file containing a mask image (mski), the function copies the full iloc extent data into a pixel buffer
nvd.nist.gov
References
Freshness
Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.