snappy-java's Integer Overflow vulnerability in compress leads to DoS
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 2 fixed, 8 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-190 and the CVSS impact.
Summary
snappy-java is a fast compressor/decompressor for Java. Due to unchecked multiplications, an integer overflow may occur in versions prior to 1.1.10.1, causing an unrecoverable fatal error. The function `compress(char[] input)` in the file `Snappy.java` receives an array of characters and compresses it. It does so by multiplying the length by 2 and passing it to the rawCompress` function. Since the length is not tested, the multiplication by two can cause an integer overflow and become negative. The rawCompress function then uses the received length and passes it to the natively compiled maxCompressedLength function, using the returned value to allocate a byte array. Since the maxCompressedLength function treats the length as an unsigned integer, it doesn’t care that it is negative, and it returns a valid value, which is casted to a signed integer by the Java engine. If the result is negative, a `java.lang.NegativeArraySizeException` exception will be raised while trying to allocate the array `buf`. On the other side, if the result is positive, the `buf` array will successfully be allocated, but its size might be too small to use for the compression, causing a fatal Access Violation error. The same issue exists also when using the `compress` functions that receive double, float, int, long and short, each using a different multiplier that may cause the same issue. The issue most likely won’t occur when using a byte array, since creating a byte array of size 0x80000000 (or any other negative value) is impossible in the first place. Version 1.1.10.1 contains a patch for this issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| xerial | snappy-java | before 1.1.10.1 | 1.1.10.1 | Patch available | CNA |
| — | org.xerial.snappy:snappy-java (Maven) | before 1.1.10.1 | 1.1.10.1 | Patch available | GHSA-fjpj-2g6w-x25r |
- snappy-java Vendorxerial Affected before 1.1.10.1 Fixed in 1.1.10.1 Patch available CNA
- org.xerial.snappy:snappy-java (Maven) Vendor— Affected before 1.1.10.1 Fixed in 1.1.10.1 Patch available GHSA-fjpj-2g6w-x25r
Remediation
- Fix · CNA snappy-java (xerial) Fixed in 1.1.10.1
- Fix · GHSA-fjpj-2g6w-x25r org.xerial.snappy:snappy-java (Maven) Fixed in 1.1.10.1 Advisory →
Red Hat 2 advisories
- RHSA-2023:7700 Released 2023-12-07 · Red Hat rating ImportantRed Hat build of Quarkus 2.13.9 release and security update
- Red Hat build of Quarkus 2.13.9
- RHSA-2023:5165 Released 2023-09-14 · Red Hat rating ImportantRed Hat AMQ Streams 2.5.0 release and security update
- Red Hat AMQ Streams 2.5.0
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Serverless | Affected | No fix yet |
| Red Hat Enterprise Linux 8 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 9 | Affected | No fix planned: Will not fix |
| Red Hat JBoss Fuse 6 | Affected | No fix planned: Will not fix |
| Red Hat JBoss Fuse Service Works 6 | Affected | No fix planned: Out of support scope |
| Red Hat OpenShift Container Platform 3.11 | Affected | No fix planned: Out of support scope |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| streams for Apache Kafka | Affected | No fix yet |
| Red Hat AMQ Streams 2.5.0 | Fixed | RHSA-2023:5165 |
| Red Hat build of Quarkus 2.13.9 | Fixed | RHSA-2023:7700 |
Not affected: 2 products
- Logging Subsystem for Red Hat OpenShift
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2023-34454
- 2026-10-03 Alias added: GHSA-fjpj-2g6w-x25r
- 2026-10-27 Fix available: Red Hat build of Quarkus 2.13.9 · Red Hat
References
Advisory 2
Other 4
- https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L169
- https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L422
- https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.java
- https://github.com/xerial/snappy-java
More xerial Snappy-java vulnerabilities
- TI-2023-23368 Missing upper bound check on chunk length in snappy-java CVSS 3.1HIGH 7.5
- TI-2023-17281 snappy-java's unchecked chunk length leads to DoS CVSS 3.1HIGH 7.5
- TI-2023-17279 snappy-java's Integer Overflow vulnerability in shuffle leads to DoS CVSS 3.1HIGH 7.5
Sources
- CVE-2023-34454 · CVE Program
- CVE-2023-34454 · NVD
- FIRST EPSS
- GHSA-fjpj-2g6w-x25r · GitHub Advisory Database · CC BY 4.0
- CVE-2023-34454 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences