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

CVE-2026-108104: Xerial snappy-java DOS Vulnerability

CVE-2026-108104 is a denial of service flaw in Xerial snappy-java that allows attackers to trigger memory errors and expose decompressed data. This post explains its impact, 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-108104 Overview

CVE-2026-108104 is a double release vulnerability in the Xerial snappy-java library, affecting versions from 1.1.7.4 before 1.1.10.10. The flaw resides in SnappyFramedInputStream, which returns pooled buffers twice to the shared buffer pool when a replacement allocation fails. An attacker can supply framed Snappy data with a large declared chunk length to trigger an OutOfMemoryError during buffer reallocation. The resulting double release causes multiple streams to share the same backing array, exposing or overwriting decompressed data belonging to other streams. The issue is tracked under [CWE-415: Double Free].

Critical Impact

Cross-stream data exposure and corruption in applications that process attacker-controlled Snappy-framed data using shared buffer pools.

Affected Products

  • Xerial snappy-java versions 1.1.7.4 through 1.1.10.9
  • Java applications and services that decompress Snappy-framed input using SnappyFramedInputStream
  • Downstream data platforms bundling vulnerable snappy-java (e.g., big-data and messaging stacks)

Discovery Timeline

  • 2026-10-09 - CVE-2026-108104 published to NVD
  • 2026-10-14 - Last updated in NVD database

Technical Details for CVE-2026-108104

Vulnerability Analysis

The defect sits in SnappyFramedInputStream.allocateBuffersBasedOnSize(int size). The method releases existing pooled buffers (input, uncompressedDirect, and buffer) back to the shared bufferPool, then allocates replacements sized for the next chunk. If the replacement allocation throws, typically an OutOfMemoryError driven by a large attacker-declared chunk length, the stream's fields still hold references to buffers that were already returned to the pool. On a later close(), the stream releases the same buffers again. The pool can then hand those backing arrays to another concurrent stream, producing cross-stream reads and writes against the same memory.

Root Cause

The root cause is unsafe state management around pooled resources. Buffer references were not cleared after releaseDirect or releaseArray calls, so a failed allocateDirect left the object owning pointers to buffers it no longer owned. The patch nulls each field immediately after releasing it, ensuring close() cannot release the same buffer twice if the subsequent allocation fails.

Attack Vector

Exploitation requires an attacker to deliver crafted Snappy-framed data to a service that decompresses it with a vulnerable snappy-java release. The attacker sets a chunk length large enough to force bufferPool.allocateDirect(size) into OutOfMemoryError. After the failure, concurrent streams drawing from the same pool receive the double-released arrays and operate on each other's plaintext, enabling confidentiality and integrity impact on decompressed payloads.

java
// Patched behavior in SnappyFramedInputStream.allocateBuffersBasedOnSize
private void allocateBuffersBasedOnSize(int size)
{
    // Clear each released buffer so that close() does not release it to the pool again if an allocation below
    // fails, which would let two streams share the same buffer
    if (input != null) {
        bufferPool.releaseDirect(input);
        input = null;
    }

    if (uncompressedDirect != null) {
        bufferPool.releaseDirect(uncompressedDirect);
        uncompressedDirect = null;
    }

    if (buffer != null) {
        bufferPool.releaseArray(buffer);
        buffer = null;
    }

    input = bufferPool.allocateDirect(size);
}
// Source: https://github.com/xerial/snappy-java/commit/139a53090a6662298924fd75d21f4769b4a219ea

Detection Methods for CVE-2026-108104

Indicators of Compromise

  • Repeated OutOfMemoryError entries originating from org.xerial.snappy.SnappyFramedInputStream or BufferPool.allocateDirect call sites.
  • Inbound Snappy-framed payloads whose declared chunk length is disproportionate to the connection or message size.
  • Application logs showing decompressed records that do not match the originating request context, suggesting cross-stream buffer reuse.

Detection Strategies

  • Software composition analysis to flag snappy-java versions 1.1.7.4 through 1.1.10.9 in Maven, Gradle, and container image manifests.
  • Runtime instrumentation that alerts when SnappyFramedInputStream throws OutOfMemoryError during concurrent decompression workloads.
  • Fuzz testing of Snappy ingestion endpoints with oversized chunk-length headers to surface vulnerable builds in staging.

Monitoring Recommendations

  • Monitor JVM heap and native memory allocation failures correlated with Snappy decompression threads.
  • Track dependency inventories using the GitHub Security Advisory GHSA-c73m-r934-8qvg advisory identifier.
  • Enable audit logging on services that accept external Snappy-framed input, including Kafka, Hadoop, and Parquet pipelines.

How to Mitigate CVE-2026-108104

Immediate Actions Required

  • Upgrade snappy-java to 1.1.10.10 or later across all applications, build artifacts, and container base images.
  • Inventory transitive dependencies with mvn dependency:tree or gradle dependencies to locate bundled vulnerable copies.
  • Restart long-running JVM services after the upgrade so new classloaders load the patched SnappyFramedInputStream.

Patch Information

The fix is published in the GitHub Snappy Java Release v1.1.10.10 and committed in GitHub Commit 139a530. Additional context is available in the VulnCheck Advisory for Snappy Java and the project's GitHub Snappy Java Repository.

Workarounds

  • Reject or cap Snappy-framed inputs with chunk lengths above a conservative application-defined limit before invoking the decoder.
  • Isolate decompression workloads so each stream uses a dedicated buffer pool, removing cross-stream sharing until patched.
  • Constrain JVM heap sizing and concurrent request counts to reduce the likelihood of allocation-failure driven double release.
bash
# Maven dependency pin for the patched release
mvn versions:use-dep-version -Dincludes=org.xerial.snappy:snappy-java -DdepVersion=1.1.10.10 -DforceVersion=true

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.