CVE-2026-32741
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedlibheif 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceHeap buffer overflow in libheif's MaskImageCodec::decode_mask_image() function when processing HEIF files with mask images (mski). The function uses memcpy with length from attacker-controlled iloc extent data to copy into a destination buffer sized only by declared image dimensions, with no bounds checking. The vulnerable path requires mskC with bits_per_pixel=8 and ispe with even width ≥64.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify libheif versionRun 'heif --version' or check the library file version (e.g., 'pkg-config --modversion libheif' or 'dpkg -l | grep libheif' on Linux, or inspect the DLL/so file properties on Windows)Affected if Version is 1.21.2 or below, or version cannot be determined and is likely older than 1.22.0
-
Determine if HEIF image processing is activeInspect any applications or services that use libheif to process HEIF/HEIC image files; check process lists or file access logs for recent .heic or .heif file operationsAffected if HEIF image files are being decoded using libheif
-
Verify mask image handling is occurringAnalyze HEIF files in use with tools like 'heif-info' or by inspecting the file structure for mskC (mask) boxes; check if any code path decodes mask images within HEIF containersAffected if HEIF files containing embedded mask images (mskC) are being processed
-
Inspect image dimensions in HEIF filesUse a HEIF parsing tool or binary analysis to examine the ispe (image spatial extents) property within processed files; specifically check for declared width values that are even and ≥ 64 pixelsAffected if Processed HEIF files have ispe width declared as an even number of 64 or greater while containing mask data with bits_per_pixel=8
-
Check for mask bits_per_pixel settingExamine the mskC (mask) properties in HEIF files to determine bits_per_pixel value; this typically requires parsing the HEIF container structureAffected if mskC mask data has bits_per_pixel=8 and the image meets the width criteria from step 4
Affected if running libheif 1.21.2 or below AND processing HEIF files with mask images where the declared image width is an even number ≥ 64 pixels and mask has 8 bits per pixel.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade libheif to version 1.22.0 or later, which contains the bounds check fix. Audit all applications and services using libheif to ensure they incorporate the patched version.
libheif version 1.22.0
- Identify the current libheif version installed in your system (e.g., run 'heif --version' or check your package manager)
- Upgrade libheif to version 1.22.0 or later. For source compilation, download the release from https://github.com/strukturag/libheif/releases/tag/v1.22.0 and rebuild. For package managers, update to the latest available package that includes version 1.22.0 or higher
- Verify the installed version is 1.22.0 or later using 'heif --version' or equivalent
- If you redistribute libheif, update your dependencies to require libheif >= 1.22.0
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation6.0 h
- Implementation4.0 h
- Testing8.0 h
- Review / QA4.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $6,144.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-32741 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-32741 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data