Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-32740: Heap-buffer overflow in libheif grid tile compositing

Published May 19, 2026 · Updated 6 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 1 in a dayToday
CVSS8.8High · v3.1
EPSS0.68%53rd percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Struktur AG
IdentifiersCVE-2026-32740CWE-787 · Out-of-bounds Write

CVE-2026-32740 is a heap-buffer-overflow write vulnerability in libheif versions 1.21.2 and earlier. The HeifPixelImage::copy_image_to() function incorrectly handles chroma-row calculations when compositing HEIF or AVIF grid images with 4:2:0 chroma planes. A crafted image containing a 1×4 grid of odd-height tiles can cause 64 bytes of attacker-controlled Cb/Cr pixel data to be written beyond a chroma-plane heap allocation. The flaw is triggered during normal decoding with the default build configuration and can cause memory corruption, application crashes, or potentially arbitrary code execution. It is fixed in libheif 1.22.0.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation corrupts adjacent heap memory with attacker-controlled pixel values, potentially causing denial of service or enabling control-flow hijacking. A reproducible, build-specific Next.js/sharp laboratory chain combines the overflow with a separate returned-pixel information disclosure, corruption of an image-plane map, and a Global Offset Table overwrite to execute attacker-supplied native code. This demonstrates potential compromise of confidentiality, integrity, and availability under the image-processing process's privileges, but does not establish reliable code execution across arbitrary deployments or exploitation in the wild.

Mitigation

If you can’t patch tonight, do this now.

Until patched, reject untrusted HEIF and AVIF files before native decoding, or disable support for these formats. Isolate necessary image processing in disposable, least-privileged workers with restricted network access, minimal writable storage, and no application secrets. Validate uploaded file signatures and prevent uploaded executable content from being loaded as native modules. Monitor image-processing crashes and unexpected native-module loads. These containment measures do not correct the underlying out-of-bounds write.

Remediation

Patch, then assume compromise.

Upgrade to libheif 1.22.0 or later, or install a distribution package containing the backported fix. Identified package fixes include Debian stable version 1.19.8-1+deb13u1 and Echo version 1.19.8-1+e3; Gentoo's broader security advisory recommends 1.23.7 or later. Rebuild or replace sharp, libvips, and other components that bundle vulnerable libheif libraries. Verify the native library actually loaded by production image-processing processes rather than relying solely on top-level application package versions.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
libheif-grid-nextjs-rceThis 47-file repository is a working, profile-driven remote RCE proof of concept for CVE-2026-32740 in libheif AVIF grid processing as reached through a deliberately vulnerable Next.js/sharp application. Its primary entry point, exploit.py, repeatedly uploads an AVIF disclosure image and retrieves its optimized PNG output. Python classifiers inspect returned alpha-channel pixels for multiple libvips-relative pointers, select exactly one supported native-stack profile and ASLR base, and fail closed on absent or ambiguous evidence. Heap-calibration code then obtains the required two-byte fake-node selector before generating the destructive payload. The final chain in rce_payload.py creates a four-row AVIF grid designed to overflow a chroma plane, redirect the Cr plane, and write a library path immediately before libvips memcpy@GOT while replacing that GOT entry with the computed address of libvips's internal g_module_open_full loader. callback/callback.c is compiled locally into an ELF shared object, uploaded as x.jpg, and loaded by the hijacked call. Its constructor runs only /usr/bin/id and returns the proof output over a TCP callback with a per-attempt token. The repository explicitly indicates that exploitation normally terminates the target process. Supporting components include avif_grid.py for controlled AVIF/ISO-BMFF construction, strict profile manifests for stock, Ubuntu PIE, and Debian PIE native stacks, offline artifact verification, heap/layout diagnostics, regression tests, evidence from repeated fresh-process runs, and Dockerfiles for intentionally vulnerable Debian 13 and Ubuntu 26.04 labs. The lab exposes POST /api/upload and GET /api/optimize?file=NAME, stores uploads under uploads/, and processes selected files with sharp. The exploit is highly version- and layout-specific rather than a general-purpose exploit framework module.FORTBRIDGE-UK · Disclosed Sep 24, 2026 · python · c · web · network · fileOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Struktur AGLibheifapplication
FAQ

Frequently asked questions

Is CVE-2026-32740 exploited in the wild?
As of Nov 11, 2026, Mallory has no reports of CVE-2026-32740 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-32740?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2026-32740, the earliest disclosed Sep 24, 2026.
Is there a patch for CVE-2026-32740?
Upgrade to libheif 1.22.0 or later, or install a distribution package containing the backported fix. Identified package fixes include Debian stable version 1.19.8-1+deb13u1 and Echo version 1.19.8-1+e3; Gentoo's broader security advisory recommends 1.23.7 or later.
What products are affected by CVE-2026-32740?
Struktur AG Libheif.
How severe is CVE-2026-32740?
CVE-2026-32740 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 0.68% (53rd percentile) as of Nov 11, 2026.
Activity feed

Recent activity

21 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+2 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity14Community discussion across Reddit, Mastodon, and other social sources.