CVE-2026-134166 in probe-image-size
Summary
by MITRE • 11/20/2026
probe-image-size before 7.5.0 contains an unbounded memory buffering vulnerability in parseExif in lib/parse_stream/webp.js that allows remote attackers to exhaust memory via an attacker-declared EXIF chunk length. Attackers can supply a WebP stream or URL to probe(url) or probe(stream) declaring a huge EXIF length after VP8X, causing unbounded buffering and process memory exhaustion.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/20/2026
The vulnerability identified in the probe-image-size library prior to version 7.5.0 represents a critical resource management failure rooted in improper input validation during image format parsing. Specifically, the flaw resides within the parseExif function located in the lib/parse_stream/webp.js module. This component is responsible for extracting metadata from WebP images, an operation that frequently involves reading EXIF chunks embedded within the file structure. The core technical deficiency lies in the library's handling of the declared length field associated with these EXIF data blocks. When a WebP stream or URL is processed via the probe function, either through direct input or remote fetching, the parser reads the metadata header and trusts the length value provided by the attacker without performing sufficient bounds checking against available system resources or reasonable file size limits.
This lack of validation allows an adversary to craft a maliciously constructed WebP image where the EXIF chunk length is set to an excessively large integer value that far exceeds the actual data present in the stream or even the total capacity of the host machine's memory. Upon encountering this malformed header, the parser attempts to allocate a buffer size corresponding directly to the declared length. Because there are no safeguards to cap this allocation based on expected maximums for image metadata, the application initiates an unbounded memory buffering operation. This behavior effectively creates a denial-of-service condition by consuming available random access memory until the operating system terminates the process due to resource exhaustion or causes significant performance degradation across the host environment as swap space is exhausted.
From a security classification perspective, this vulnerability aligns with CWE-789: Memory Allocation with Excessive Size Value and CWE-400: Uncontrolled Resource Consumption. The attack vector allows for remote exploitation if the library is used to process untrusted image uploads or fetches from external sources without prior sanitization. In terms of adversary tactics, this behavior corresponds to ATT&CK technique T1496: Resource Hijacking, where an attacker consumes computational resources to disrupt service availability rather than compromising data confidentiality or integrity directly. The impact extends beyond simple application crashes; in server-side environments such as Node.js applications using this library for image processing pipelines, a single successful exploit can lead to complete service unavailability and potential cascading failures if the process is not automatically restarted with appropriate resource limits.
Mitigation strategies must prioritize immediate version upgrades to probe-image-size 7.5.0 or later, where developers have implemented proper bounds checking and size validation for metadata parsing operations. For organizations unable to upgrade immediately due to dependency constraints, defensive coding practices should be employed at the application layer. This includes implementing strict file size limits before passing streams to the library, validating image headers against known safe maximums for EXIF data, and utilizing sandboxing or containerization with memory quotas to limit the blast radius of any potential resource exhaustion attacks. Additionally, integrating input validation libraries that enforce schema compliance on incoming binary data can provide an additional layer of defense against malformed inputs designed to trigger such parsing errors.