Description
zstd-jni before 1.5.7-14 fails to validate the samples buffer capacity in Zstd.trainFromBufferDirect, allowing attackers to read past buffer boundaries by supplying oversized per-sample lengths. Attackers can trigger out-of-bounds memory access by providing crafted sample length arrays that cause the native implementation to walk past the buffer allocation, resulting in JVM termination.
Severity (CVSS)
| Base score | 8.7 |
|---|---|
| Severity | High |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-125 — Out-of-bounds Read
Affected products
| Vendor | Product | Versions |
|---|---|---|
| luben | zstd-jni | 1.3.3-1 to <1.5.7-14 |
References
- https://github.com/luben/zstd-jni/security/advisories/GHSA-257p-3h6w-pg7h (vendor-advisory)
- https://github.com/luben/zstd-jni/commit/bba6cfca2c0897f1fa004f4193247479f10da853 (patch)
- https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/native/jni_zdict.c (technical-description)
- https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/Zstd.java (technical-description)
- https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14 (release-notes)
- https://github.com/luben/zstd-jni/commit/53d3c6342883f7d6717b2477a7f9c1b4a4a56980 (technical-description patch)
- https://github.com/luben/zstd-jni (product)
- https://www.vulncheck.com/advisories/zstd-jni-1.3.3-1-through-1.5.7-13-out-of-bounds-read-via-zstd-trainfrombufferdirect (third-party-advisory)
Generated from the official CVE List on 10 Sep 2026 07:03 UTC.