CVE-2023-34454: snappy-java's Integer Overflow vulnerability in compress leads to DoS
Vulnerability summary
CVE-2023-34454 is a high (CVSS 7.5) Integer Overflow or Wraparound vulnerability in xerial snappy-java. EPSS estimates a 1.47% chance of exploitation in the next 30 days, higher than 73.7% of scored vulnerabilities.
Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 2Timeline
- 15-06-2023PublishedVulnerability first disclosed.
- 12-12-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
6 scores · 6 sources · 1 version- CVE.orgCNA5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · WolfiEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · ChainguardEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · MavenEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
EPSS trend
Probability
1.47%
Chance of exploitation in the next 30 days
Percentile
74%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.47% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard2 products
- druid< 35.0.1-r1 | < 37.0.0-r0
- hadoop-fips-3.3.6All versions (No fix recorded)
Org.xerial.snappy1 product
- snappy-java< 1.1.10.1
Ubuntu1 product
- snappy-javaAll versions (No fix recorded)
Wolfi1 product
- druid< 35.0.1-r1 | < 37.0.0-r0
Xerial1 product
- snappy-java< 1.1.10.1
5 vendors · 6 products
References
10 links- github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25rX Refsource CONFIRMREPORTAdvisoryWEBVendor Advisory
- github.com/xerial/snappy-java/commit/d0042551e4a3509a725038eb9b2ad1f683674d94X Refsource MISCREPORTFIXWEBPatch
- github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.javaX Refsource MISCREPORTWEBIssue TrackingProduct