Vulnerability Details : CVE-2023-34455
Potential exploit
snappy-java is a fast compressor/decompressor for Java. Due to use of an unchecked chunk length, an unrecoverable fatal error can occur in versions prior to 1.1.10.1.
The code in the function hasNextChunk in the fileSnappyInputStream.java checks if a given stream has more chunks to read. It does that by attempting to read 4 bytes. If it wasn’t possible to read the 4 bytes, the function returns false. Otherwise, if 4 bytes were available, the code treats them as the length of the next chunk.
In the case that the `compressed` variable is null, a byte array is allocated with the size given by the input data. Since the code doesn’t test the legality of the `chunkSize` variable, it is possible to pass a negative number (such as 0xFFFFFFFF which is -1), which will cause the code to raise a `java.lang.NegativeArraySizeException` exception. A worse case would happen when passing a huge positive value (such as 0x7FFFFFFF), which would raise the fatal `java.lang.OutOfMemoryError` error.
Version 1.1.10.1 contains a patch for this issue.
Products affected by CVE-2023-34455
- cpe:2.3:a:xerial:snappy-java:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2023-34455
0.45%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 61 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2023-34455
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
7.5
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
3.9
|
3.6
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
3.9
|
3.6
|
GitHub, Inc. |
CWE ids for CVE-2023-34455
-
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.Assigned by:
- nvd@nist.gov (Primary)
- security-advisories@github.com (Secondary)
References for CVE-2023-34455
-
https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/SnappyInputStream.java#L388
snappy-java/src/main/java/org/xerial/snappy/SnappyInputStream.java at 05c39b2ca9b5b7b39611529cc302d3d796329611 · xerial/snappy-java · GitHubIssue Tracking
-
https://github.com/xerial/snappy-java/security/advisories/GHSA-qcwq-55hx-v3vh
Unchecked chunk length leads to DoS · Advisory · xerial/snappy-java · GitHubExploit;Vendor Advisory
-
https://security.netapp.com/advisory/ntap-20230818-0009/
CVE-2023-34455 Apache Kafka Vulnerability in NetApp Products | NetApp Product SecurityThird Party Advisory
-
https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea
Merge pull request from GHSA-qcwq-55hx-v3vh · xerial/snappy-java@3bf6785 · GitHubPatch
-
https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyInputStream.java
snappy-java/src/main/java/org/xerial/snappy/SnappyInputStream.java at master · xerial/snappy-java · GitHubIssue Tracking
Jump to