Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-106452 Overview
CVE-2026-106452 is a resource allocation vulnerability in the yawkat lz4-java library, which provides LZ4 compression for Java applications. The flaw resides in net.jpountz.lz4.LZ4BlockInputStream.refill(), which trusts an attacker-controlled compressedLen field in the legacy LZ4 block header. The reader allocates a buffer of that size before validating payload data, enabling a header-only stream to request a near-2 GiB allocation and exhaust the Java Virtual Machine (JVM) heap. The issue is fixed in version 1.11.2.
Critical Impact
A remote, unauthenticated attacker can submit a crafted LZ4 stream to trigger uncontrolled memory allocation, exhausting the JVM heap and causing denial of service in applications that decompress untrusted input.
Affected Products
- yawkat lz4-java versions prior to 1.11.2
- Java applications using net.jpountz.lz4.LZ4BlockInputStream to decompress untrusted data
- Downstream libraries and services bundling vulnerable lz4-java releases
Discovery Timeline
- 2026-10-06 - CVE-2026-106452 published to the National Vulnerability Database (NVD)
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-106452
Vulnerability Analysis
The weakness is classified as [CWE-789: Memory Allocation with Excessive Size Value]. The LZ4BlockInputStream.refill() method parses the legacy LZ4 block header and reads the compressedLen field. It validates only that the value is nonnegative, then allocates a byte buffer of that length to hold compressed input before actually reading the payload.
An attacker who controls the stream can set compressedLen close to Integer.MAX_VALUE without supplying the matching payload. The JVM commits memory for the oversized array during allocation, and repeated requests exhaust heap space. The result is OutOfMemoryError and denial of service for any thread or process performing decompression.
Canonical LZ4 writers emit raw blocks when compressed output is not smaller than the original block, so legitimate streams never produce oversized compressed blocks. The vulnerable reader accepts non-canonical oversized values, breaking the implicit size contract between writer and reader.
Root Cause
The root cause is missing upper-bound validation on the compressedLen field before buffer allocation. The code enforces compressedLen >= 0 but does not cap the value against the configured block size or available input, violating safe deserialization practices for untrusted length fields.
Attack Vector
Exploitation requires only that an application decompress attacker-supplied LZ4 data using LZ4BlockInputStream. This commonly includes network services accepting compressed payloads, message queues, log ingestion pipelines, and file parsers. No authentication or user interaction is required. The attacker sends a minimal LZ4 header declaring a near-2 GiB compressedLen and terminates the stream, forcing the reader to request a large allocation on each parse attempt.
See the GitHub Security Advisory GHSA-4v53-57pg-c464 and the fix commit for technical details on the vulnerable code path and corrected validation logic.
Detection Methods for CVE-2026-106452
Indicators of Compromise
- Repeated java.lang.OutOfMemoryError: Java heap space exceptions originating in net.jpountz.lz4.LZ4BlockInputStream.refill
- JVM crash dumps showing large pending byte array allocations tied to LZ4 decompression threads
- Spikes in heap utilization immediately after receiving small inbound payloads on endpoints that accept LZ4-compressed data
Detection Strategies
- Inventory Java dependencies using Software Composition Analysis (SCA) tools and flag any net.jpountz.lz4:lz4-java or org.lz4:lz4-java artifacts below version 1.11.2
- Enable JVM flight recording or heap allocation sampling on services that decompress external LZ4 streams to catch anomalous single-array allocations above typical block sizes
- Correlate application OutOfMemoryError events with upstream request logs to identify malformed LZ4 payloads
Monitoring Recommendations
- Alert on process restarts and heap exhaustion metrics in services exposing LZ4 decompression endpoints
- Monitor inbound payload size distributions for LZ4 consumers and flag headers declaring compressed lengths far exceeding observed baselines
- Track dependency drift via build pipeline attestations to confirm patched lz4-java versions reach production
How to Mitigate CVE-2026-106452
Immediate Actions Required
- Upgrade lz4-java to version 1.11.2 or later in all Java applications and transitive dependencies
- Audit services that call LZ4BlockInputStream on externally sourced data and prioritize patching internet-facing consumers
- Rebuild and redeploy container images and uber-JARs that bundle the vulnerable library
Patch Information
The fix is included in GitHub Release v1.11.2. The corrective change is documented in the upstream fix commit and the GitHub Security Advisory GHSA-4v53-57pg-c464. The patched refill() validates compressedLen against a reasonable upper bound before allocation.
Workarounds
- Wrap LZ4BlockInputStream consumers with a size-limited InputStream that rejects streams declaring oversized compressed blocks
- Enforce request body size limits at the application gateway or reverse proxy to constrain attacker-controlled payloads before they reach decompression code
- Isolate decompression workloads in processes with constrained maximum heap (-Xmx) so that heap exhaustion does not affect critical service components
# Example Maven dependency update to the fixed release
# pom.xml
# <dependency>
# <groupId>org.lz4</groupId>
# <artifactId>lz4-java</artifactId>
# <version>1.11.2</version>
# </dependency>
mvn versions:use-dep-version -Dincludes=org.lz4:lz4-java -DdepVersion=1.11.2 -DforceVersion=true
mvn dependency:tree | grep lz4-java
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

