GHSA-8wh2-6qhj-h7j9

Suggest an improvement
Source
https://github.com/advisories/GHSA-8wh2-6qhj-h7j9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-8wh2-6qhj-h7j9/GHSA-8wh2-6qhj-h7j9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-8wh2-6qhj-h7j9
Aliases
Related
Published
2024-06-04T17:38:31Z
Modified
2024-06-04T17:57:01.675353Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
iq80 Snappy out-of-bounds read when uncompressing data, leading to JVM crash
Details

Summary

iq80 Snappy performs out-of-bounds read access when uncompressing certain data, which can lead to a JVM crash.

Details

When uncompressing certain data, Snappy tries to read outside the bounds of the given byte arrays. Because Snappy uses the JDK class sun.misc.Unsafe to speed up memory access, no additional bounds checks are performed and this has similar security consequences as out-of-bounds access in C or C++, namely it can lead to non-deterministic behavior or crash the JVM.

iq80 Snappy is not actively maintained anymore. As quick fix users can upgrade to version 0.5, but in the long term users should prefer migrating to the Snappy implementation in https://github.com/airlift/aircompressor (version 0.27 or newer).

Impact

When uncompressing data from untrusted users, this can be exploited for a denial-of-service attack by crashing the JVM.

Database specific
{
    "nvd_published_at": "2024-06-03T15:15:09Z",
    "cwe_ids": [
        "CWE-125"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-06-04T17:38:31Z"
}
References

Affected packages

Maven / org.iq80.snappy:snappy

Package

Name
org.iq80.snappy:snappy
View open source insights on deps.dev
Purl
pkg:maven/org.iq80.snappy/snappy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.5

Affected versions

0.*

0.1
0.2
0.3
0.4