Skip to content

Double release of pooled buffers in SnappyFramedInputStream can share a buffer across streams

High
xerial published GHSA-c73m-r934-8qvg Oct 3, 2026

Package

maven org.xerial.snappy:snappy-java (Maven)

Affected versions

<= 1.1.10.9

Patched versions

1.1.10.10

Description

Impact

When SnappyFramedInputStream needed larger buffers, it returned its current buffers to the buffer pool before allocating replacements. If the allocation failed (for example with OutOfMemoryError caused by a large declared chunk length), the stream still referenced the released buffers, and close() released them to the pool a second time. The default CachingBufferPool does not detect duplicates, so two later SnappyFramedInputStream instances could receive the same backing array, and one stream's decompressed data could be read or overwritten through another.

Patches

Fixed in 1.1.10.10 (#747). Buffer fields are cleared right after release, so a failed allocation can no longer lead to a second release.

Workarounds

Discard the buffer pool after an OutOfMemoryError during decompression, or pass a non-caching BufferPool to SnappyFramedInputStream.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N

CVE ID

No known CVE

Weaknesses

Double Free

The product calls free() twice on the same memory address. Learn more on MITRE.

Improper Control of a Resource Through its Lifetime

The product does not maintain or incorrectly maintains control over a resource throughout its lifetime of creation, use, and release. Learn more on MITRE.

Credits