CVE-2026-135167 in LibRaw
Summary
by MITRE • 11/23/2026
LibRaw 0.22.0 through 0.22.3 contains a heap out-of-bounds read vulnerability in HuffTable::len() because parse_dht() stores Huffman DC symbols without validating them as difference categories. Attackers can supply a crafted TIFF/ARW file with oversized Huffman symbols in a Sony YCbCr lossless JPEG stream to crash applications decoding it, causing denial of service.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in LibRaw versions 0.22.0 through 0.22.3 represents a critical heap-based out-of-bounds read condition located within the HuffTable::len() function. This flaw stems from an insufficient validation mechanism during the parsing of Huffman coding tables, specifically within the parse_dht() routine. When processing digital image files such as TIFF or ARW formats that contain embedded Sony YCbCr lossless JPEG streams, the library fails to verify whether incoming Huffman DC symbols conform to expected difference categories before storing them in memory structures. This lack of boundary checking allows malformed data with oversized Huffman symbols to be processed without triggering appropriate error handling or length validation checks.
From a technical perspective, the core issue lies in the assumption that input data adheres strictly to format specifications regarding symbol lengths and category classifications. By bypassing these validations, an attacker can craft malicious files where the Huffman table definitions specify bit-lengths that exceed the allocated buffer capacity for decoding operations. When the HuffTable::len() function attempts to access or calculate values based on these invalid entries, it reads memory locations beyond the intended heap allocation boundaries. This behavior is characteristic of CWE-125, which describes out-of-bounds read vulnerabilities where software accesses data outside the bounds of a buffer, potentially leading to information disclosure or system instability depending on how the accessed memory contents are utilized by subsequent code paths.
The operational impact of this vulnerability primarily manifests as a denial of service condition for applications relying on LibRaw for image processing. Since the out-of-bounds read occurs during the decoding phase triggered by opening or parsing specific crafted files, it typically results in immediate application crashes due to segmentation faults or memory access violations. While heap over-reads can sometimes lead to information disclosure if the accessed data is subsequently used in sensitive operations, the primary reported consequence here is system instability and service interruption. Attackers can exploit this flaw remotely by distributing maliciously constructed image files through email attachments, web uploads, or file sharing platforms, causing any vulnerable software instance processing these assets to terminate unexpectedly.
This vulnerability aligns with MITRE ATT&CK technique T1496, Resource Hijacking, specifically under the sub-technique of Denial of Service via resource exhaustion caused by malformed input handling. The exploitation vector involves tricking a victim into opening or automatically processing a specially crafted file that triggers the memory corruption logic within the image decoding pipeline. To mitigate this risk, organizations should immediately update LibRaw to version 0.22.4 or later where these validation checks have been implemented. Additionally, developers integrating this library should implement strict input sanitization and employ sandboxing techniques for processing untrusted media files. Monitoring application logs for frequent crashes related to image parsing components can also serve as an early detection mechanism for potential exploitation attempts in production environments.