Skip to content
Fencer Vulns
medium 5.9

CVE-2023-34454 json

snappy-java's Integer Overflow vulnerability in compress leads to DoS

published 2023-06-15 3 y ago modified 2026-09-10 1 mo ago also GHSA-fjpj-2g6w-x25r , EUVD-2023-1784

cvss
5.9
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.5%
EPSS 1.5% chance of exploitation in 30 days, percentile 73%
public exploits
0
none known

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.

Patch / fix

  • maven org.xerial.snappy:snappy-java 1.1.10.1
  • xerial snappy-java 1.1.10.1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-34454 updated cvss 5.9

snappy-java: Integer overflow in compress leads to DoS

  • Red Hat OpenShift Serverless snappy-java
    affected: no fix available
  • Red Hat Enterprise Linux 8 log4j, log4j-jcl, log4j-web, log4j-slf4j Red Hat Enterprise Linux 9 log4j, log4j-jcl, log4j-slf4j Red Hat JBoss Fuse 6 snappy-java-all snappy-java-all, snappy-java-all-repolib snappy-java-all-repolib
    affected: no fix planned “Will not fix”
  • Red Hat JBoss Fuse Service Works 6 snappy-java-all snappy-java-all, snappy-java-all-repolib snappy-java-all-repolib Red Hat OpenShift Container Platform 3.11 openshift3/ose-metrics-cassandra
    affected: no fix planned “Out of support scope”
  • Red Hat Software Collections snappy-java
    affected: no fix planned “Will not fix”
  • Red Hat streams for Apache Kafka snappy-java, snappy-java-repolib snappy-java-repolib
    affected: no fix available
  • Red Hat AMQ Streams 2.5.0
    fixed: vendor fix RHSA-2023:5165
  • Red Hat build of Quarkus 2.13.9
    fixed: vendor fix RHSA-2023:7700
  • Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/elasticsearch6-rhel8 Red Hat Satellite 6 snappy-java
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
partial
Assessed
22 mo ago

Exploit prediction

1.47% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25r referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub 3.1 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
maven org.xerial.snappy:snappy-java
<1.1.10.1
1.1.10.1

Affected products

  • xerial snappy-java

Classification

Weakness
  • CWE-190 Integer Overflow or Wraparound

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.