Skip to main content

zstd-jni CVE-2026-87824

| EUVDEUVD-2026-75022 HIGH
Out-of-bounds Read (CWE-125)
2026-09-09 VulnCheck GHSA-v36p-vv44-8qfg
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send API request with crafted sampleSizes array
  2. Delivery
    Application passes attacker-controlled sizes to trainFromBufferDirect
  3. Exploit
    Native JNI code sums lengths without calling GetDirectBufferCapacity
  4. Execution
    Out-of-bounds read walks past DirectBuffer allocation
  5. Impact
    JVM process terminates (denial of service)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application calls Zstd.trainFromBufferDirect (or the underlying native trainFromBufferDirect0) with a sampleSizes array that is fully or partially controlled by the attacker. Dictionary training is not part of normal compression or decompression workflows; it is a specialized API used to build custom Zstd dictionaries from representative data samples. Applications that do not expose this code path to untrusted callers - which is the majority of zstd-jni consumers - are not exploitable. If the calling application enforces authentication before reaching the dictionary-training endpoint, the effective privilege requirement is elevated to match that gate. Exploitation is therefore limited to deployments where: (1) zstd-jni 1.3.3-1 through 1.5.7-13 is in use, and (2) the application accepts attacker-controlled per-sample size values in calls to the dictionary-training API without independent bounds validation.

Impact

The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H) reflects the severity of a remotely triggerable JVM crash with no authentication barrier. Real-world exploitability is constrained by the attack surface: Zstd.trainFromBufferDirect is a dictionary-training API, not invoked during routine compression or decompression, so only applications that explicitly expose this code path to untrusted input are vulnerable. EPSS data was not provided in the intelligence package, making probability-of-exploitation comparisons unavailable; however, the absence of a CISA KEV listing and no identified public exploit suggest exploitation remains theoretical. The SSVC automatable dimension is uncertain - while the CVSS vector implies no barriers to automation, reaching a dictionary-training endpoint requires a specific application architecture that is far from universal. The JVM-crash impact would be immediately disruptive to any service running in the affected process, including high-throughput streaming pipelines built on Apache Kafka or Spark where zstd-jni is a common dependency - even a mid-sized data engineering team should treat this as a straightforward patch-and-deploy rather than a triage-and-defer item. CVSS 4.0 accurately characterizes availability-only impact (VA:H, VC:N/VI:N), correctly ruling out information disclosure as a practical outcome since the OOB read triggers a crash rather than exfiltrating buffer contents.

Exploit ScenarioDerived

An attacker targeting a service that exposes Zstd dictionary training - for example, a data compression API that allows users to submit sample corpora - sends a request containing a sampleSizes array whose values sum to more than the capacity of the accompanying ByteBuffer. The native JNI layer iterates over the oversized lengths without a bounds check, reading past the DirectBuffer allocation, which triggers a JVM hard crash and takes down the entire service process. No public proof-of-concept exploit has been identified at time of analysis, but the fix commit provides sufficient detail to reconstruct the vulnerable code path.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 09, 2026

Out-of-bounds memory access in zstd-jni versions 1.3.3-1 through 1.5.7-13 enables unauthenticated network-accessible attackers to crash the JVM by supplying crafted sample-size arrays to the Zstd.trainFromBufferDirect dictionary-training API. The native C implementation (jni_zdict.c) failed to sum caller-supplied sample lengths against the DirectBuffer's actual capacity before iterating, allowing the native code to walk past the buffer allocation boundary and trigger a hard JVM termination. A patched release (v1.5.7-14) is available; no public exploit has been identified at time of analysis.

RemediationAI

Upgrade zstd-jni to version 1.5.7-14 or later; the patched release is available at https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14 and is documented in security advisory GHSA-257p-3h6w-pg7h. Maven and Gradle consumers should update their dependency declaration to com.github.luben:zstd-jni:1.5.7-14. If an immediate dependency upgrade cannot be coordinated (e.g., due to transitive dependency constraints in a managed build), the effective workaround is to disable or gate any application-level endpoints that invoke Zstd.trainFromBufferDirect or trainFromBufferDirect0 with caller-controlled sample size arrays; this eliminates the attack surface entirely at the cost of disabling dictionary-training functionality. Input validation at the application layer (rejecting sample size arrays whose sum exceeds a known buffer bound before the JNI call) can also prevent exploitation but is fragile and not a substitute for patching.

Affected VersionsENISA

zstd-jni 1.3.3-1 <1.5.7-14

Affected Packages

euvd zstd_jni fix: 1.5.7-14

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

zstd-jni (CPE: cpe:2.3:a:luben:zstd-jni) is a JNI wrapper that exposes Facebook's Zstandard compression algorithm to the JVM. The vulnerability resides in jni_zdict.c, specifically the Java_com_github_luben_zstd_Zstd_trainFromBufferDirect0 native function, which accepts a Java DirectBuffer containing training samples and a long[] array of per-sample byte lengths. Prior to the fix, the code iterated over the sample-size array and passed the total to the ZDICT_trainFromBuffer API without first calling GetDirectBufferCapacity to obtain the buffer's actual allocation size. CWE-125 (Out-of-Bounds Read) is the root cause: the native pointer advances past the end of the allocated buffer region during size summation and ZDICT processing, triggering undefined behavior in the JVM process that manifests as an unrecoverable crash rather than a catchable Java exception. The fix (commits bba6cfca and 53d3c634) adds a GetDirectBufferCapacity call and a pre-loop validation that aborts to an error handler if any sample size is negative or the sum exceeds buffer capacity.

Know when Zstd Jni gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

OOB read causes JVM crash (A:H) with no confidentiality or integrity impact; network-reachable without auth via exposed dictionary-training API.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Technical POC Analysis

An unchecked out-of-bounds read (CWE-125) in the native dictionary-training path of zstd-jni.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

zstd-jni, a Java compression library integrated into data processing and streaming applications, contains a remote denial-of-service vulnerability allowing unauthenticated attackers to crash the Java Virtual Machine by sending specially crafted data. Organizations using this library face potential service outages without any user authentication requirement.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Medium
popular JNI compression library used in Kafka, Spark pipelines
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Important

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy