CVE-2026-84384 Overview
CVE-2026-84384 is a denial-of-service vulnerability in libheif, an open-source HEIF and AVIF file format decoder and encoder maintained by Struktur AG. Versions from 1.19.0 through 1.23.1 fail to enforce output size limits when decompressing metadata and unci image data using Brotli and zlib. Crafted HEIF or AVIF files can force decompress_brotli() and do_inflate() to accumulate unbounded output. A small input file can consume all available memory and terminate the host process. The issue is fixed in version 1.23.2.
Critical Impact
A single crafted HEIF or AVIF file can exhaust process memory during file opening, causing any application or service that uses libheif for image parsing to crash.
Affected Products
- libheif versions 1.19.0 through 1.23.1
- Applications and services embedding libheif for HEIF or AVIF decoding
- Image processing pipelines and thumbnail generators that ingest untrusted HEIF/AVIF content
Discovery Timeline
- 2026-09-18 - CVE-2026-84384 published to NVD
- 2026-09-18 - Last updated in NVD database
Technical Details for CVE-2026-84384
Vulnerability Analysis
The flaw is an improper resource shutdown and release condition categorized under [CWE-409] (Improper Handling of Highly Compressed Data). libheif supports compressed metadata and unci image payloads using Brotli and zlib. Both decompression paths accumulate output into a growing buffer without consulting the heif_security_limits structure that gates other size-bounded operations.
During file opening, HeifContext::interpret_heif_file_images() iterates over every compressed metadata item in the container. An attacker who supplies multiple compressed items — or a single icef unit that references overlapping ranges — forces the same compressed payload to be decompressed repeatedly. The result is a decompression amplification attack: a few kilobytes of input expand to gigabytes of resident memory before parsing completes.
Root Cause
The decompress_brotli() function has no output ceiling. The do_inflate() zlib path checks only a small temporary buffer inside a branch that valid streams never reach, so no meaningful cap is enforced on well-formed but hostile inputs. Neither routine reports allocations to the MemoryHandle accounting layer, so the security limits framework cannot short-circuit the operation.
Attack Vector
Exploitation requires no authentication or user interaction beyond opening or previewing a malicious file. Any network-facing service that accepts user-supplied HEIF or AVIF content — messaging platforms, mail gateways, cloud photo storage, or web upload endpoints — can be crashed by a small crafted file.
// Security patch from libheif 1.23.2 - unc_decoder.h
// do_decompress_data now receives heif_security_limits to bound output growth
Result<std::vector<uint8_t>> do_decompress_data(std::shared_ptr<const Box_cmpC>& cmpC_box,
- std::vector<uint8_t> compressed_data) const;
+ std::vector<uint8_t> compressed_data,
+ const heif_security_limits* limits) const;
const uint32_t m_width;
const uint32_t m_height;
Source: GitHub Libheif Commit 21893e8
// Security patch from libheif 1.23.2 - compression.h
// Forward declaration of heif_security_limits added to compression helpers
#include <error.h>
#include <libheif/heif_uncompressed.h>
+struct heif_security_limits;
Source: GitHub Libheif Commit 21893e8
Detection Methods for CVE-2026-84384
Indicators of Compromise
- Sudden process termination or out-of-memory kills in services that parse HEIF or AVIF files
- HEIF/AVIF files with unusually high compression ratios or repeated icef units referencing overlapping ranges
- Repeated crashes of image thumbnailers, mail scanners, or upload processors after receiving image attachments
Detection Strategies
- Inventory installed libheif versions across servers, containers, and desktop endpoints and flag any release below 1.23.2
- Inspect ingested HEIF and AVIF files for multiple compressed metadata items or cmpC boxes referencing Brotli or zlib
- Correlate application crash telemetry with recent file uploads containing the heic, heif, or avif MIME types
Monitoring Recommendations
- Alert on resident memory spikes in image processing workers followed by SIGKILL or OOM-killer events
- Track upload volumes and rejection rates on services that accept HEIF/AVIF and baseline for anomalies
- Log libheif decoder errors and abnormal termination codes from downstream media pipelines
How to Mitigate CVE-2026-84384
Immediate Actions Required
- Upgrade libheif to version 1.23.2 or later on all systems that decode HEIF or AVIF content
- Rebuild and redeploy applications statically linked against vulnerable libheif releases
- Temporarily disable HEIF/AVIF processing on internet-facing upload endpoints until patches are applied
Patch Information
The fix landed in libheif 1.23.2. Commit 21893e8f66c8b79363ca2809391b07d35e1a95ec threads heif_security_limits into the Brotli and zlib decompression paths so accumulated output is bounded by the configured maximum. See the GitHub Security Advisory GHSA-24wx-9w62-c96w and the libheif 1.23.2 release notes for full details.
Workarounds
- Apply per-process memory limits (for example, cgroup memory.max or ulimit -v) so a crashing decoder does not destabilize the host
- Run HEIF/AVIF decoding in a sandboxed or short-lived worker process that can be restarted after termination
- Reject inbound HEIF/AVIF files above a conservative size threshold at the gateway or WAF before they reach libheif
# Verify the installed libheif version and upgrade if below 1.23.2
dpkg -l | grep libheif
apt-get update && apt-get install --only-upgrade libheif1
# Example cgroup v2 memory cap for an image-processing service
systemctl set-property image-worker.service MemoryMax=512M
systemctl restart image-worker.service
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

