CVE-2026-87795
massOut-of-Bounds Native Heap Read in zstd-jni ZstdDictCompress Constructor
zstd-jni, the widely used Java JNI binding for the Zstandard compression library, does not validate the offset and length parameters passed to its ZstdDictCompress constructor in versions before 1.5.7-14, resulting in an out-of-bounds read of native heap memory (CWE-125). The flaw is triggered when an application supplies untrusted, attacker-controlled offset or length values to that constructor; the library then reads memory beyond the intended buffer into the compression dictionary. The primary consequence, per the CVSS 4.0 score of 8.8, is high availability impact from JVM crashes, with a lower confidentiality impact since out-of-bounds native heap bytes can be folded into compressed output. Any Java application or platform embedding an affected zstd-jni version and exposing dictionary parameters to untrusted input is affected; the library's footprint is large because it ships inside major JVM data infrastructure, but direct exploitability depends on the application's usage of dictionary-based compression. There is no known public proof-of-concept, the issue is not in CISA's KEV catalog, and no in-the-wild exploitation has been reported.
What to do: Upgrade zstd-jni to version 1.5.7-14 or later, which validates the offset and length parameters in ZstdDictCompress. In the meantime, validate or bound any user-supplied offset/length values before passing them to the constructor, and audit your dependency tree (Maven coordinates com.github.luben:zstd-jni) to identify applications that build compression dictionaries from untrusted input.
| zstd-jni project (luben) zstd-jni | all versions before 1.5.7-14 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
zstd-jni versions before 1.5.7-14 fail to validate offset and length parameters in the ZstdDictCompress constructor, allowing out-of-bounds memory reads. Attackers can supply untrusted offset or length values to read native heap memory into the compression dictionary, typically causing JVM crashes.
- Weakness
- CWE-125
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.