Skip to main content
VulnerabilityPublished Updated

CVE-2026-32741: strukturag libheif · Heap-based Buffer Overflow

Affects strukturag libheifSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.1 High : upgrade to 1.22.0 soon.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
7.1High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 19 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
strukturaglibheifAffected
  • <1.22.0
Fixed in
  • 1.22.0
GitHubstrukturag/libheifpkg:github/strukturag/libheifOther threatsAffected
  • <1.22.0
Fixed in
  • 1.22.0

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

Community reviews

Loading reviews…