---
id: "CVE-2026-93451"
kind: "vulnerability"
aliases: ["CVE-2026-93451", "GHSA-gwq9-9ffj-mvrv"]
title: "snappy-java: Heap buffer overflow in Snappy.uncompress*Array typed-array methods"
severity: "high"
cvss: 7.5
epss: 0.00503
exploited: false
status: "open"
category: "package"
products: [{"name": "org.xerial.snappy:snappy-java", "fixed": ["1.1.10.9"], "affected": "<= 1.1.10.8", "ecosystem": "maven"}]
ecosystems: ["maven"]
tags: ["cwe-193", "cwe-787", "java", "maven", "package", "snappy-java"]
not_affected_if: ["byte-array-only-use", "no-untrusted-input"]
published_at: "2026-09-18T00:17:49+00:00"
first_seen_at: "2026-10-27T15:34:04+00:00"
updated_at: "2026-10-27T16:03:35+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-gwq9-9ffj-mvrv", "first_seen_at": "2026-10-27T15:34:04+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-93451", "first_seen_at": "2026-10-27T16:03:35+00:00"}]
---

# snappy-java: Heap buffer overflow in Snappy.uncompress*Array typed-array methods

Six Snappy.uncompress typed-array methods (char, short, int, long, float, double) size the output array by integer division, so a declared length that is not a multiple of the element size lets native code write up to 7 bytes past the end of the Java array. An attacker who supplies compressed input can corrupt heap memory in the calling process.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- maven:org.xerial.snappy:snappy-java affected <= 1.1.10.8 fixed 1.1.10.9

## How to check

- Run `mvn dependency:tree` or inspect the build file for `org.xerial.snappy:snappy-java` and confirm the version is `1.1.10.8` or lower.
- Find calls to `uncompressCharArray`, `uncompressShortArray`, `uncompressIntArray`, `uncompressLongArray`, `uncompressFloatArray` or `uncompressDoubleArray` in your code.

## Fix

- Upgrade `org.xerial.snappy:snappy-java` to `1.1.10.9`.
- Until upgraded, check `Snappy.uncompressedLength(input)` is a multiple of the element size before calling these methods.

## Timeline

- 2026-10-27T15:34:04+00:00 ghsa https://github.com/advisories/GHSA-gwq9-9ffj-mvrv
- 2026-10-27T16:03:35+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-93451

## From the sources

### Impact
`Snappy.uncompressCharArray`, `uncompressShortArray`, `uncompressIntArray`, `uncompressLongArray`, `uncompressFloatArray` and `uncompressDoubleArray` sized the result array by dividing the declared uncompressed byte length by the element size, but native code wrote the full byte length. If the declared length is not a multiple of the element size, up to 7 bytes are written past the end of the Java array, corrupting the heap.

### Patches
Fixed in 1.1.10.9 ([#739](https://github.com/xerial/snappy-java/pull/739)). These methods now reject uncompressed lengths that are not a multiple of the element size with `SnappyIOException`.

### Workarounds
Check that `Snappy.uncompressedLength(input)` is a multiple of the element size before calling these methods.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
