CVE-2026-32741: strukturag libheif · Heap-based Buffer Overflow
Affects strukturag libheifSource CVE Database V5
Not known to be exploited · CVSS 7.1 High : upgrade to 1.22.0 soon.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 27% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.22.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:HExploitation evidence
Disclosed: evidence found.
CVE published 19 May 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade libheif and strukturag/libheif to 1.22.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| strukturaglibheif | Affected
| Fixed in
|
GitHubstrukturag/libheifpkg:github/strukturag/libheifOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
This vulnerability is fixed in libheif version 1.22.0. Users should upgrade to version 1.22.0 or later to remediate this issue. Patch status is not explicitly stated in the vendor advisory excerpt, but the description confirms the fix in 1.22.0. No additional mitigations are indicated by the vendor advisory.
Description
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.
References
- github.com/strukturag/libheif/security/advisories/GHSA-j3w5-7whq-p37q (opens in a new tab)
- github.com/strukturag/libheif/releases/tag/v1.22.0 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2026-32741 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2480002 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32741.json (opens in a new tab)