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

CVE-2026-108106: Xerial snappy-java Memory Exhaustion DoS

CVE-2026-108106 is a denial of service vulnerability in Xerial snappy-java that allows attackers to exhaust JVM memory through unbounded allocations. This article covers the technical details, affected versions, and mitigation strategies.

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

CVE-2026-108106 is an unbounded memory allocation vulnerability in Xerial snappy-java before version 1.1.10.9. The flaw lets attackers exhaust Java Virtual Machine (JVM) memory by declaring an oversized uncompressed length in compressed input. A small number of crafted bytes supplied to Snappy.uncompress, uncompressString, SnappyInputStream, or SnappyFramedInputStream can force allocations up to 2 GB. The resulting OutOfMemoryError crashes the hosting process and produces a denial-of-service condition. The weakness is tracked under CWE-789: Memory Allocation with Excessive Size Value.

Critical Impact

Remote, unauthenticated attackers can crash any Java service that decompresses untrusted Snappy input, affecting data pipelines, Kafka consumers, and Hadoop/Parquet workloads that rely on snappy-java.

Affected Products

  • Xerial snappy-java versions prior to 1.1.10.9
  • Java applications embedding vulnerable snappy-java for compression or decompression
  • Data platforms shipping vulnerable snappy-java transitively (for example, Apache Kafka clients, Apache Spark, Apache Hadoop, Apache Parquet)

Discovery Timeline

  • 2026-10-09 - CVE-2026-108106 published to the National Vulnerability Database (NVD)
  • 2026-10-13 - Last updated in NVD database

Technical Details for CVE-2026-108106

Vulnerability Analysis

The snappy-java library decompresses Snappy-formatted byte streams into Java byte arrays. Before 1.1.10.9, the decompression entry points trusted the uncompressed-length field declared in the compressed input header. The library allocated a destination buffer of that declared size before validating whether the compressed payload could plausibly produce that output. An attacker who controls even a few header bytes can request allocations up to the 2 GB JVM array limit. The runtime raises OutOfMemoryError and terminates the request-processing thread or the entire JVM.

Services that accept Snappy-compressed data over the network are the primary targets. Message brokers, log ingestion endpoints, and columnar-storage readers routinely decompress third-party content without upfront size validation.

Root Cause

The decompression routines in Snappy.java and the framed input streams used the declared uncompressed length directly as an allocation size. There was no cross-check against the compressed input length, no configurable upper bound, and no incremental allocation strategy. This matches the pattern described in CWE-789, where an attacker-controlled size value drives a memory allocation.

Attack Vector

Exploitation requires only that an attacker deliver a crafted Snappy frame to a vulnerable decoder. No authentication, user interaction, or local access is needed. Any of the following sinks are reachable:

  • Snappy.uncompress(byte[])
  • Snappy.uncompressString(byte[])
  • SnappyInputStream.read(...)
  • SnappyFramedInputStream.read(...)
java
// Patch excerpt from SnappyFramedInputStream.java (#739)
// Source: https://github.com/xerial/snappy-java/commit/943c6043a292568575e8347af4507d015e802c75

// Skip chunks in a loop rather than recursively: a zero-length skippable chunk is only 4 bytes, so
// recursing per chunk lets a small input exhaust the stack
FrameMetaData frameMetaData;
while (true) {
    if (!readBlockHeader()) {
        eof = true;
        return false;
    }

    // get action based on header
    frameMetaData = getFrameMetaData(frameHeader);
    if (FrameAction.SKIP != frameMetaData.frameAction) {
        break;
    }
    SnappyFramed.skip(rbc, frameMetaData.length,
            ByteBuffer.wrap(buffer));
}

The patch replaces recursive chunk skipping with an iterative loop and adds buffer and length validation before native decompression calls. See the GitHub Security Advisory GHSA-q233-g92q-qxp6 for the full fix.

Detection Methods for CVE-2026-108106

Indicators of Compromise

  • Repeated java.lang.OutOfMemoryError: Java heap space entries tied to stack frames in org.xerial.snappy.Snappy or SnappyFramedInputStream
  • Abrupt JVM termination or container restarts shortly after inbound traffic to Snappy decompression endpoints
  • Inbound requests containing abnormally small Snappy payloads whose declared uncompressed length approaches 2 GB

Detection Strategies

  • Inventory Java applications for snappy-java versions below 1.1.10.9 using software composition analysis against Maven, Gradle, and container image manifests
  • Alert on JVM crash loops and OutOfMemoryError spikes in services that decompress third-party Snappy data
  • Correlate network ingress to Kafka, Parquet, or custom endpoints with heap-exhaustion events on the receiving host

Monitoring Recommendations

  • Export JVM memory and garbage-collection metrics to the Singularity Data Lake or an equivalent SIEM to baseline normal heap usage and flag sudden allocation spikes
  • Watch application logs for OutOfMemoryError stack traces referencing org.xerial.snappy packages
  • Monitor service availability for message consumers and data readers that process attacker-reachable Snappy streams

How to Mitigate CVE-2026-108106

Immediate Actions Required

  • Upgrade snappy-java to version 1.1.10.9 or later in all direct and transitive dependencies
  • Rebuild and redeploy container images and shaded JARs that bundle older snappy-java releases
  • Enforce input size limits at the network or application layer for endpoints that accept Snappy-compressed data

Patch Information

Xerial published the fix in snappy-java release v1.1.10.9. The underlying code change is in commit 943c6043, which validates buffer bounds and declared lengths before invoking native decompression. Review the VulnCheck advisory for additional vendor coordination details.

Workarounds

  • Reject or truncate inbound payloads whose declared uncompressed Snappy length exceeds a defensible maximum for your workload
  • Isolate Snappy decompression in a sandboxed worker process with a bounded -Xmx heap so a crash does not take down the primary service
  • Disable or route around application features that decompress untrusted Snappy input until the dependency upgrade is deployed
bash
# Verify snappy-java version in a Maven project
mvn dependency:tree -Dincludes=org.xerial.snappy:snappy-java

# Pin the fixed version in pom.xml
# <dependency>
#   <groupId>org.xerial.snappy</groupId>
#   <artifactId>snappy-java</artifactId>
#   <version>1.1.10.9</version>
# </dependency>

# Gradle equivalent
# implementation("org.xerial.snappy:snappy-java:1.1.10.9")

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.