ZeroHour

CVE-2026-87823

large

Out-of-bounds memory read in zstd-jni direct-ByteBuffer frame-size native methods

CVSS 4.0
8.8 high
EPSS
<1%p36
Published
()
Modified
AI analysis

zstd-jni, the Java JNI binding for the Zstandard compression library, relies on 32-bit signed bounds checks in three direct-ByteBuffer frame-size native methods, which allows negative or overflowing offsets to bypass validation (CWE-190, integer overflow/wraparound). An attacker who can control the offset passed to these methods — for example a value near Integer.MIN_VALUE — triggers an out-of-bounds native memory read that can hit unmapped memory and terminate the JVM, or cause frame-size data to be read from unintended memory locations. The practical impact is primarily availability (JVM process crash) with limited disclosure of memory contents, consistent with the CVSS 4.0 score of 8.8 (low confidentiality, high availability impact, network vector, no privileges). Any application embedding zstd-jni before 1.5.7-14 that passes attacker-controlled offsets into the affected direct-ByteBuffer native methods is affected, while deployments that only use higher-level compress/decompress APIs with internally managed buffers are unlikely to be reachable. No public proof-of-concept, in-the-wild exploitation, or KEV listing is known as of this analysis.

What to do: Upgrade to zstd-jni 1.5.7-14 or later and rebuild/redeploy any application, container, or distribution that bundles the library. Until patched, audit call sites that feed application- or user-controlled offsets (e.g., ByteBuffer positions near Integer.MIN_VALUE) into the direct-ByteBuffer frame-size native methods and validate/clamp offsets before the native call. Check dependency trees (mvn dependency:tree, gradle dependencies) for vulnerable zstd-jni versions, including transitive pulls via Kafka- or Spark-class components.

Affected
zstd-jni project (com.github.luben:zstd-jni) zstd-jniall versions before 1.5.7-14
Estimated exposure
largeon the order of 10,000–100,000 JVM systems plausibly exposed (library footprint is far larger: millions of installs bundle zstd-jni) — Estimated from deployment patterns: zstd-jni is a ubiquitous JVM compression dependency bundled with major data platforms such as Apache Kafka and Apache Spark, implying millions of installs carrying the library, but exploitability is…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

zstd-jni before 1.5.7-14 performs 32-bit signed bounds checks on three direct-ByteBuffer frame-size native methods, allowing out-of-bounds memory reads via negative or overflowing offsets. Attackers can supply negative offset values near Integer.MIN_VALUE to read unmapped memory, causing JVM termination or extracting arbitrary frame size data from unintended memory locations.

Weakness
CWE-190
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 news

No ingested article mentions this CVE yet.