org.xerial.snappy:snappy-java@1.1.10.9

  • latest version

    1.1.10.12

  • latest non vulnerable version

  • first published

    15 years ago

  • latest version published

    2 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.xerial.snappy:snappy-java package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Double Free

    Affected versions of this package are vulnerable to Double Free via SnappyFramedInputStream in src/main/java/org/xerial/snappy/SnappyFramedInputStream.java. An attacker can make two SnappyFramedInputStream instances share the same backing array by supplying framed data with a large declared chunk length that triggers an allocation failure during buffer growth. When the stream returns its current direct and array buffers to the pool and the replacement allocation fails, close() can release the same buffers again. In deployments using the default caching buffer pool, a later stream may receive that reused buffer and read or overwrite another stream’s decompressed data.

    Workarounds

    • Discard the buffer pool after an OutOfMemoryError during decompression, so the same released buffers are not reused by later SnappyFramedInputStream instances.
    • Pass a non-caching BufferPool to SnappyFramedInputStream, so buffers are not retained and handed out again to another stream after a failed allocation.

    How to fix Double Free?

    Upgrade org.xerial.snappy:snappy-java to version 1.1.10.10 or higher.

    [,1.1.10.10)
    • H
    Out-of-bounds Write

    Affected versions of this package are vulnerable to Out-of-bounds Write via the Snappy.uncompress(ByteBuffer, ByteBuffer) method in org/xerial/snappy/Snappy.java. An attacker can trigger JVM termination by supplying valid compressed input that expands beyond the destination ByteBuffer capacity. The vulnerable code does not validate the output buffer size against the decompressed size, so writes past the buffer boundary occur during decompression, crashing applications that process attacker-controlled Snappy data.

    How to fix Out-of-bounds Write?

    Upgrade org.xerial.snappy:snappy-java to version 1.1.10.10 or higher.

    [0,1.1.10.10)