All vulnerabilities
CVE-2026-106452GHSA-4v53-57pg-c464

at.yawk.lz4:lz4-java: yawkat LZ4 Java: LZ4BlockInputStream allocates an unvalidated compressed length from the stream header

yawkat at.yawk.lz4:lz4-javamavenLibraries & packages
CVSS
5.3Medium
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.37%Chance of exploitation activity in the next 30 days, higher than 29% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.11.2Fixed versionGitHub
Published6 Oct 2026Updated 7 Oct 2026CVE List

What fixes it

  • 1.11.2at.yawk.lz4:lz4-java, mavenGitHub<dependency><groupId>at.yawk.lz4</groupId><artifactId>lz4-java</artifactId><version>1.11.2</version></dependency>
  • 1.11.2at.yawk.lz4:lz4-java, MavenOSV<dependency><groupId>at.yawk.lz4</groupId><artifactId>lz4-java</artifactId><version>1.11.2</version></dependency>

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Summary

LZ4BlockInputStream grows its compressed-input buffer to the attacker-controlled compressedLen value from the legacy LZ4Block stream header before reading any payload bytes. A header-only input can therefore trigger a near-2 GiB allocation and exhaust the JVM heap.

Details

In net.jpountz.lz4.LZ4BlockInputStream, refill() validates that compressedLen is nonnegative but does not cap it before allocation:

case COMPRESSION_METHOD_LZ4:
  if (compressedBuffer.length < compressedLen) {
    compressedBuffer = new byte[Math.max(compressedLen, compressedBuffer.length * 3 / 2)];
  }
  readFully(compressedBuffer, compressedLen);

The paired LZ4BlockOutputStream never emits such a block. If compression is not smaller than the original block, it writes the block as RAW:

if (compressedLength >= o) {
  compressMethod = COMPRESSION_METHOD_RAW;
  compressedLength = o;
} else {
  compressMethod = COMPRESSION_METHOD_LZ4;
}

Existing readers generally accept noncanonical LZ4-method blocks where compressedLen >= originalLen, but no canonical writer found produces them.

Impact

Applications that pass attacker-controlled legacy LZ4Block streams to LZ4BlockInputStream can suffer heap exhaustion from a header-only input. The impact is availability-only and requires no valid compressed payload.

Patch

As of lz4-java 1.11.2, lz4-java rejects lz4 blocks where the compressed length is larger than uncompressed. Readers would generally emit these as raw blocks instead. You can use the new acceptOversizedBlocks flag to restore the old behavior, but this reintroduces the DoS vector.

Text from GitHub Advisory Database

Affected versions 24

  • at.yawk.lz4:lz4-java, maven<= 1.11.1GitHub
  • org.lz4:lz4-java, maven<= 1.8.1GitHub
  • lz4-javaaffected: < 1.11.2CVE List
  • at.yawk.lz4:lz4-java, Mavenfrom first release, fixed in 1.11.2OSV
  • at.yawk.lz4:lz4-java, Maven1.10.0OSV
  • at.yawk.lz4:lz4-java, Maven1.10.1OSV
  • at.yawk.lz4:lz4-java, Maven1.10.2OSV
  • at.yawk.lz4:lz4-java, Maven1.10.3OSV
  • at.yawk.lz4:lz4-java, Maven1.10.4OSV
  • at.yawk.lz4:lz4-java, Maven1.11.0OSV
  • at.yawk.lz4:lz4-java, Maven1.11.1OSV
  • at.yawk.lz4:lz4-java, Maven1.8.1OSV
  • at.yawk.lz4:lz4-java, Maven1.9.0OSV
  • org.lz4:lz4-java, Mavenfrom first release, through 1.8.1OSV
  • org.lz4:lz4-java, Maven1.4OSV
  • org.lz4:lz4-java, Maven1.4.0OSV
  • org.lz4:lz4-java, Maven1.4.1OSV
  • org.lz4:lz4-java, Maven1.5.0OSV
  • org.lz4:lz4-java, Maven1.5.1OSV
  • org.lz4:lz4-java, Maven1.6.0OSV
  • org.lz4:lz4-java, Maven1.7.0OSV
  • org.lz4:lz4-java, Maven1.7.1OSV
  • org.lz4:lz4-java, Maven1.8.0OSV
  • org.lz4:lz4-java, Maven1.8.1OSV

References 5