Skip to main content
Vulnerability Database/CVE-2026-106449

CVE-2026-106449: LZ4 Java Stack Exhaustion DOS Vulnerability

CVE-2026-106449 is a stack exhaustion denial of service flaw in LZ4 Java that allows attackers to crash applications through malicious compressed streams. This post explains its technical details, affected versions, and mitigation steps.

Published:

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-106449 Overview

CVE-2026-106449 is a denial-of-service vulnerability in the yawkat LZ4 Java library, which provides LZ4 compression for Java applications. Versions prior to 1.11.4 are affected when net.jpountz.lz4.LZ4BlockInputStream is configured with stopOnEmptyBlock set to false. The stream handles each well-formed empty LZ4 block by recursively calling refill(). An attacker-controlled compressed stream containing a long sequence of empty blocks can exhaust the decoding thread's stack and raise StackOverflowError. The default stopOnEmptyBlock setting of true is not affected, and the issue does not cause memory corruption. The vulnerability is tracked as [CWE-674: Uncontrolled Recursion].

Critical Impact

Attacker-controlled compressed input can crash the decoding thread, producing a denial-of-service condition in applications that process untrusted LZ4 streams with non-default settings.

Affected Products

  • yawkat lz4-java versions prior to 1.11.4
  • Applications instantiating LZ4BlockInputStream with stopOnEmptyBlock=false
  • Java services decompressing untrusted LZ4-encoded network or file input

Discovery Timeline

  • 2026-10-06 - CVE-2026-106449 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-106449

Vulnerability Analysis

The flaw resides in the refill() method of LZ4BlockInputStream. When stopOnEmptyBlock is disabled, each empty block encountered during decompression triggers a recursive call to refill() instead of iterating. Because the JVM stack is finite, a sufficiently long run of consecutive empty blocks consumes stack frames until StackOverflowError is thrown. The decoding thread then terminates abnormally.

An attacker who can supply the compressed input stream can craft a payload consisting entirely of valid empty LZ4 blocks. The payload is small on the wire but produces unbounded recursion depth during decoding. The impact is limited to availability of the decoding thread. Confidentiality and integrity are not affected, and no memory corruption occurs.

Root Cause

The root cause is uncontrolled recursion in handling of empty blocks. The original implementation chose recursion as the control-flow mechanism to advance past empty blocks, with no bound on recursion depth. The fix converts the recursion to iteration using a while loop, so arbitrarily long runs of empty blocks consume only a single stack frame.

Attack Vector

Exploitation requires that the target application reads an attacker-controlled LZ4 stream through LZ4BlockInputStream configured with stopOnEmptyBlock=false. The attacker constructs a stream containing many consecutive well-formed empty blocks and delivers it over any supported input channel such as HTTP uploads, message queues, or files.

java
// Patch excerpt from LZ4BlockInputStream.java
  private void refill() throws IOException {
    // Loop rather than recurse over empty blocks so that a long run of them cannot overflow the stack
    while (!readBlock()) {
      // empty block with stopOnEmptyBlock == false, continue with the next block
    }
  }

  /**
   * Reads the next block.
   *
   * @return {@code false} if an empty block was read and reading should continue with the next block
   */
  private boolean readBlock() throws IOException {
    final int headerRead = tryReadFully(compressedBuffer, HEADER_LENGTH);
    if (headerRead != HEADER_LENGTH) {
      // Only a stream that ends exactly at a block boundary is a clean end
      if (headerRead == 0 && !stopOnEmptyBlock) {
        finished = true;
        return true;
      }
      throw new EOFException("Stream ended prematurely");
    }

Source: GitHub Commit c8ebf97

Detection Methods for CVE-2026-106449

Indicators of Compromise

  • StackOverflowError thrown from net.jpountz.lz4.LZ4BlockInputStream.refill in application or JVM logs
  • Abrupt termination of decoder threads processing externally sourced LZ4 streams
  • Small compressed payloads producing disproportionate decoding failures

Detection Strategies

  • Inventory dependencies for net.jpountz:lz4-java (yawkat fork) versions earlier than 1.11.4 using software composition analysis tools
  • Grep source code for LZ4BlockInputStream constructors or builders that pass stopOnEmptyBlock=false
  • Review runtime exception monitoring for StackOverflowError stack traces referencing LZ4BlockInputStream

Monitoring Recommendations

  • Alert on repeated decoder thread crashes correlated with specific upstream sources or request origins
  • Track dependency drift against the fixed version 1.11.4 in continuous integration pipelines
  • Capture and retain stack traces from unhandled JVM errors in centralized logging for retrospective analysis

How to Mitigate CVE-2026-106449

Immediate Actions Required

  • Upgrade net.jpountz:lz4-java to version 1.11.4 or later across all affected services
  • Audit application code for any use of stopOnEmptyBlock=false and validate whether the setting is required
  • Restrict acceptance of LZ4-compressed input to trusted sources where feasible until patching is complete

Patch Information

The fix is included in GitHub Release v1.11.4. The patch replaces the recursive refill() logic with an iterative loop over empty blocks, as documented in the GitHub Security Advisory GHSA-343h-94h5-c4wr.

Workarounds

  • Leave stopOnEmptyBlock at its default value of true, which is not affected by the vulnerability
  • Wrap decompression calls in bounded worker threads that can be terminated and replaced on failure
  • Validate or size-limit compressed input before passing it to LZ4BlockInputStream
bash
# Verify the resolved lz4-java version in a Maven project
mvn dependency:tree -Dincludes=net.jpountz:lz4-java

# Verify the resolved lz4-java version in a Gradle project
./gradlew dependencyInsight --dependency net.jpountz: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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.