Skip to content
Threat Feed
high advisory

Out-of-Bounds Memory Read in zstd-jni

The zstd-jni library versions prior to 1.5.7-14 are vulnerable to an out-of-bounds memory read in the ZstdDictCompress constructor, allowing local or remote attackers to read native heap memory into a compression dictionary.

CVE search metadata

CVE search record: CVE-2026-87795. Severity: high. CVSS: 8.2. KEV: no. Product: zstd-jni (< 1.5.7-14). Brief: Out-of-Bounds Memory Read in zstd-jni. Brief link: https://feed.craftedsignal.io/briefs/2026-09-cve-2026-87795/

The zstd-jni library, which provides Java bindings for the Zstandard compression algorithm, contains a memory safety vulnerability identified as CVE-2026-87795. The flaw exists within the ZstdDictCompress constructor, where the library fails to properly validate the offset and length parameters provided during dictionary creation.

By supplying specially crafted offset or length values to the constructor, an attacker can trigger an out-of-bounds read within the native heap. This action potentially allows sensitive memory contents to be pulled into the compression dictionary. While the primary documented outcome is a JVM crash due to memory corruption, the underlying primitive provides a mechanism for information disclosure. The vulnerability affects all versions of zstd-jni prior to 1.5.7-14. This is particularly relevant for Java applications that process untrusted data using the ZstdDictCompress functionality, as the lack of parameter validation enables an attacker to manipulate memory access patterns directly.

Impact

Successful exploitation leads to memory corruption, which most commonly results in a denial-of-service condition via JVM crash. However, the out-of-bounds read capability poses a significant risk of information disclosure, where sensitive data residing in the native heap may be leaked into the application's compression dictionary. Applications that handle high-privilege or sensitive data and utilize zstd-jni for compression tasks are at the highest risk.

Recommendation

Prioritize the update of all Java applications utilizing the zstd-jni library to version 1.5.7-14 or later to resolve the input validation issue in CVE-2026-87795.

Audit application codebases to identify if ZstdDictCompress is invoked with parameters derived from untrusted user input, as this represents the primary attack vector for this vulnerability.

Mitigations

Upgrade zstd-jni to version 1.5.7-14 or later

immediate IT Operations

CVE-2026-87795