Out-of-bounds ReadWeakness · CWE-125

CVE-2026-32882

HIGH · 7.1 CVSS v3.1 Published 2026-05-19
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
78/100
Remediation priority · High
Remotely reachable No privileges

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 · unedited
libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and prior contain a heap buffer over-read in HeifPixelImage::overlay() in libheif/pixelimage.cc. When compositing an overlay image (iovl) whose child image has a different bit depth for the alpha channel than for the color channels, the function indexes into the alpha plane using the color channel stride (in_stride) instead of the previously retrieved alpha_stride, causing reads past the end of the alpha buffer (up to 3,123 bytes for a 100×50 image with 10-bit color and 8-bit alpha). A crafted HEIF file can exploit this to cause a denial of service (crash) or potentially disclose adjacent heap memory through leaked bytes embedded in the decoded output pixels. This issue has been fixed in versionThis 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 confidence

Heap buffer over-read in libheif's HeifPixelImage::overlay() function where alpha channel indexing incorrectly uses the color channel stride (in_stride) instead of the alpha stride when processing overlay images with mismatched alpha/color bit depths, causing reads past the end of the alpha buffer and potential heap memory disclosure.

MitigationUpgrade libheif to version 1.22.0 or later; if immediate upgrade is not feasible, implement input validation to reject HEIF files with overlay images where alpha and color channels have differing bit depths.

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
Low
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify libheif library installation
    Search for libheif shared libraries on the system. On Linux: `find /usr -name 'libheif*' 2>/dev/null`. On Windows: search for heif.dll in system directories and application folders. On macOS: `find / -name 'libheif*' 2>/dev/null` or check via `otool -L <application> | grep heif` for linked applications.
    Affected if libheif library files exist on the system or are linked into applications
  2. Determine installed libheif version
    Check the library version. On Linux: `dpkg -l | grep libheif` or `rpm -qa | grep libheif`. For the shared library file itself: `strings <path-to-libheif.so> | grep -E '^1\.'` or check the SONAME via `readelf -d <path-to-libheif.so> | grep SONAME`. On Windows: right-click heif.dll, select Properties, then Details tab for File Version.
    Affected if The installed version is lower than 1.22.0 or cannot be determined and the library is present
  3. Identify applications using libheif
    Scan for applications that process HEIF/HEIC image files and may link libheif. Use `ldd <application-binary> 2>/dev/null | grep heif` on Linux. Check for image viewers, converters, or editors that handle HEIF format. Common tools include ImageMagick, libvips, darktable, and graphic editors.
    Affected if Applications linked against libheif exist and process HEIF images with overlay/compositing operations
  4. Check for HEIF files with alpha channels
    Identify HEIF/HEIC files in the environment that contain alpha channels, as the vulnerability triggers during overlay operations with mismatched bit depths between alpha and color channels. Use tools like `heif-info <file.heic>` or ImageMagick's `identify -verbose <file.heic>` to inspect file metadata for alpha channel presence.
    Affected if HEIF files with alpha channels are present and being processed by libheif-based tools
  5. Verify overlay/compositing operations
    If you have access to application logs or can monitor image processing, check whether overlay or compositing operations are performed on HEIF images. The vulnerability specifically exists in the HeifPixelImage::overlay() function. Review any scripts or tools that composite multiple HEIF images.
    Affected if Overlay or compositing operations on HEIF images with alpha channels are performed using libheif

The environment is affected if libheif version below 1.22.0 is installed and HEIF images with alpha channels undergo overlay or compositing operations that expose the incorrect alpha channel stride indexing flaw.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade libheif to version 1.22.0 or later; if immediate upgrade is not feasible, implement input validation to reject HEIF files with overlay images where alpha and color channels have differing bit depths.

Recommended fix High confidence

libheif version 1.22.0 or later

  1. 1. Identify the package manager or build system used to install libheif in your environment (e.g., apt, yum, dnf, brew, conda, or source compilation)
  2. 2. If using a system package manager (apt/dnf/yum), check if version 1.22.0 or later is available in your distribution's repositories
  3. 3. If the fixed version is not available in system repos, consider building from source: clone the libheif repository, checkout version 1.22.0 or later, run ./configure, make, and make install
  4. 4. If using a dependency manager (conaconda, brew), search for libheif and upgrade to version 1.22.0 or later
  5. 5. After upgrading, rebuild any applications that link against libheif to ensure they use the new library version
  6. 6. Verify the installed version using: heif-info --version or by checking the library file
Caveat Review libheif 1.22.0 release notes for any API/ABI changes that may require code adjustments in dependent applications

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation4.0 h
  • Testing8.0 h
  • Review / QA4.0 h
20.0 hours of engineering $3,440
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,504.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-32882 — 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-32882 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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