7.5

CVE-2023-34454: snappy-java's Integer Overflow vulnerability in compress leads to DoS

Modified
AliasesUBUNTU-CVE-2023-34454CGA-2cxm-5qfp-rwm5CGA-cx8q-fx2w-qfw3
Published 15-06-2023Last modified 12-12-2024

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.

Priority
Routine

Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
1.47%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 0 · Related 2

Timeline

  1. 15-06-2023
    PublishedVulnerability first disclosed.
  2. 12-12-2024
    Last 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

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

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

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

5 vendors · 6 products

References

10 links