CVE-2026-84444 Overview
CVE-2026-84444 is a heap out-of-bounds write [CWE-787] in libheif, an open-source HEIF and AVIF file format decoder and encoder. The flaw affects builds compiled with the WITH_UNCOMPRESSED_CODEC option in versions prior to 1.23.2. The tiled writing path accepts independently constructed tile images whose component-plane dimensions do not match the prototype image geometry. The unc_encoder::encode_tile() function lacks a size-validation gate, so oversized component planes cause unc_encoder_component_interleave::encode_tile() to copy attacker-controlled data past the heap output buffer.
Critical Impact
A crafted tile image processed through the uncompressed encoder path can write attacker-controlled bytes beyond a heap buffer, enabling memory corruption that impacts integrity and availability.
Affected Products
- libheif versions prior to 1.23.2 when built with WITH_UNCOMPRESSED_CODEC enabled
- Applications and image pipelines linking the affected libheif builds
- Downstream Linux distributions and container images that ship the vulnerable library
Discovery Timeline
- 2026-09-18 - CVE-2026-84444 published to the National Vulnerability Database (NVD)
- 2026-09-22 - Last updated in NVD database
Technical Details for CVE-2026-84444
Vulnerability Analysis
The defect exists in libheif's uncompressed codec encoder. When an application uses heif_context_add_image_tile() to assemble a tiled unci image, each tile is constructed independently of the prototype image that established the encoder configuration. The prototype fixes the component list, bit depths, subsampling, and bytes-per-pixel layout. Subsequent tiles are handed off to ImageItem_uncompressed::add_image_tile(), which forwards them directly to unc_encoder::encode_tile(). The encoder sizes its output buffer using the frozen tile geometry while copying pixel data from the tile's actual component planes. When the two disagree, the copy overruns the allocation.
Root Cause
The root cause is a missing input-validation gate in the tiled encoding path. The static helper check_component_sizes() exists to verify that every component plane matches the dimensions implied by the primary image, but it was never invoked before encode_tile(). Without that check, the encoder trusts caller-provided plane dimensions and produces an out-of-bounds heap write [CWE-787].
Attack Vector
Exploitation requires an application that exposes libheif's tiled unci writing path to attacker-controlled input, such as an image conversion service or an SDK that constructs tiles from parsed inputs. The attacker supplies a tile image whose component planes exceed the geometry declared by the prototype. Attack complexity is high because the target must build libheif with WITH_UNCOMPRESSED_CODEC and expose the tiling API to untrusted data.
// Patched interface in libheif/codecs/uncompressed/unc_encoder.h
virtual uint64_t compute_tile_data_size_bytes(uint32_t tile_width, uint32_t tile_height) const = 0;
// Encode one tile. This validates 'image' against the encoder configuration before handing it
// to the actual encoder implementation. Do not bypass it by calling encode_tile_impl() directly.
[[nodiscard]] Result<std::vector<uint8_t>> encode_tile(const std::shared_ptr<const HeifPixelImage>& image) const;
// Check that 'image' may be passed to encode_tile().
Error check_image_compatibility(const std::shared_ptr<const HeifPixelImage>& image) const;
// Verify that every component plane has the size implied by the primary image dimensions
// (chroma planes may be subsampled). The encoders assume this when sizing their output buffer,
// so a mismatched plane would otherwise overflow the buffer during encoding.
static Error check_component_sizes(const std::shared_ptr<const HeifPixelImage>& src_image);
protected:
// Encode one tile. Only called through encode_tile(), which has verified that 'image' matches
// the configuration this encoder was constructed with.
[[nodiscard]] virtual std::vector<uint8_t> encode_tile_impl(const std::shared_ptr<const HeifPixelImage>& image) const = 0;
Source: GitHub Commit e65071f
Detection Methods for CVE-2026-84444
Indicators of Compromise
- Crashes or heap corruption reports in processes that link libheif and use heif_context_add_image_tile()
- Unexpected process termination or memory sanitizer alerts from image-processing services handling HEIF/AVIF or unci inputs
- Presence of libheif shared libraries at versions prior to 1.23.2 compiled with WITH_UNCOMPRESSED_CODEC
Detection Strategies
- Inventory installed packages and container images to identify libheif builds older than 1.23.2
- Use software composition analysis (SCA) tooling to flag applications linking vulnerable libheif versions
- Run image-processing services under AddressSanitizer or equivalent in test environments to surface out-of-bounds writes in the encoder path
Monitoring Recommendations
- Alert on repeated crashes of image-conversion workers or media pipelines that ingest HEIF/AVIF input
- Correlate abnormal child-process terminations with recent uploads to endpoints that call the libheif tiling API
- Monitor for anomalous heap allocation patterns and segmentation faults in workloads processing user-supplied media
How to Mitigate CVE-2026-84444
Immediate Actions Required
- Upgrade libheif to version 1.23.2 or later on all systems and container images
- Rebuild and redeploy any applications that statically link libheif once the patched source is in place
- Audit application code that calls heif_context_add_image_tile() to confirm tile inputs come from trusted sources until the upgrade completes
Patch Information
The fix is available in libheif v1.23.2. The patch introduces check_image_compatibility() and routes all tile submissions through a validating encode_tile() wrapper that calls encode_tile_impl() only after verifying component-plane sizes. See the GitHub Security Advisory GHSA-j264-xvrp-5v7q for full advisory details.
Workarounds
- Rebuild libheif with WITH_UNCOMPRESSED_CODEC disabled if the uncompressed codec is not required by the application
- Restrict the tiled writing path to trusted inputs and validate tile geometry against the prototype image before invoking heif_context_add_image_tile()
- Isolate image-processing workloads in sandboxed or containerized environments with strict resource limits
# Verify installed libheif version and upgrade
dpkg -l | grep libheif
apt-get update && apt-get install --only-upgrade libheif1
# Or build from patched source with the uncompressed codec disabled if unused
git clone --branch v1.23.2 https://github.com/strukturag/libheif.git
cd libheif && mkdir build && cd build
cmake -DWITH_UNCOMPRESSED_CODEC=OFF ..
make && sudo make install
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
