Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify application using zstd-jni <1.5.7-14
-
DeliveryTrigger close() on a stream object
-
ExploitCall setDict or other setter on closed stream
-
ExecutionJNI write through freed native pointer
-
ImpactCorrupt adjacent JVM heap memory or crash JVM process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the ability to call setDict, setLongMax, setLevel, or setRefMultipleDDicts on a zstd-jni stream instance that has already had close() invoked on it. This can occur in two primary scenarios: (1) application code contains a use-after-close programming error in its own stream management logic, and an attacker can trigger that code path via crafted input; (2) a multi-threaded application races a close() call against a setter call on the same stream object without proper synchronization. The attacker must have a code-execution foothold in the same JVM process or be able to drive application logic that exercises one of these code paths. Exploitation is limited to environments using zstd-jni 1.3.8-4 through 1.5.7-13 for streaming compression/decompression with mutable stream configuration. Default correctly-written single-threaded usage that does not call setters post-close is not vulnerable. |
| Impact | The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H) scores 7.0, reflecting local attack vector, low complexity, no privilege requirement, and high integrity plus availability impact with no confidentiality loss. The local vector is appropriate for a library-level flaw: exploitation requires the ability to invoke Java methods on a closed stream object, which presupposes code execution context in the same JVM process. Real-world risk depends heavily on whether application code using zstd-jni exposes these stream setters to untrusted input paths - for example, a server that exposes stream configuration endpoints, or a multi-threaded application with use-after-close race conditions. No EPSS data is provided and no KEV listing exists, indicating no confirmed active exploitation at time of analysis. The long affected version range (1.3.8-4 through 1.5.7-13) broadens deployment exposure, but the local attack surface limits immediate widespread automated exploitation. The JVM crash vector (VA:H) makes this a meaningful denial-of-service risk in production services using zstd-jni for streaming workloads such as Kafka or Spark pipelines. |
| Exploit ScenarioDerived | An attacker who can influence a multi-threaded Java service's compression/decompression pipeline - for example by triggering concurrent stream close and configuration-update operations - causes a closed ZstdInputStream to have setDict called on it, writing through a freed native zstd context pointer. Depending on what the allocator has placed at the freed address, this either corrupts a live Java object on the native heap (potentially altering application state) or triggers a segmentation fault that crashes the JVM, taking down the entire service process. No public proof-of-concept code is identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 09, 2026
Use-after-free in zstd-jni versions 1.3.8-4 through 1.5.7-13 allows callers to invoke setDict, setLongMax, setLevel, and setRefMultipleDDicts on already-closed stream objects, writing through freed native (JNI) pointers into arbitrary JVM memory. The root cause is missing closed-state validation in stream classes such as BaseZstdBufferDecompressingStreamNoFinalizer and ZstdInputStreamNoFinalizer, meaning the JNI layer operates on native context structures that have already been released. Exploitation can corrupt unrelated heap objects or terminate the JVM process entirely. No public exploit code or CISA KEV listing is identified at time of analysis.
RemediationAI
Upgrade zstd-jni to version 1.5.7-14 or later; the patched release is confirmed at https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14, and the fixing commits are f38f9a1563113d96d0fc38baee543f7457dd8a8e, 393d7311766abbc285b149302c0fe1f94b16d555, and 0827ed02551bbd8d6f8e4bbff99d83bf50f91938. Applications that use zstd-jni via dependency managers (Maven, Gradle) should update the dependency declaration to 1.5.7-14. As a workaround prior to patching, audit application code to ensure no code path calls setDict, setLongMax, setLevel, or setRefMultipleDDicts after invoking close() on a stream object; in multi-threaded contexts, ensure stream lifecycle and setter calls are properly synchronized to prevent use-after-close races. The workaround has no correctness side effects if implemented correctly but requires code review effort and does not eliminate the underlying library flaw.
Affected VersionsENISA
Affected Packages
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 Java Native Interface wrapper around Facebook's Zstandard (zstd) compression library, exposing high-performance streaming compression and decompression in pure Java applications. The vulnerability class is CWE-416 (Use After Free): when a stream is closed, the underlying native zstd context and dictionary structures are freed via JNI calls into native C code, but the Java-layer closed flag was not checked before subsequent calls to configuration setter methods. The patch (commit f38f9a1 et al.) adds explicit if (closed) { throw new IOException("Stream closed"); } guards to setDict, setLongMax, setLevel, and setRefMultipleDDicts, and also introduces proper shared-lock management for active dictionary references to prevent premature garbage collection of native dict objects. The JVM memory model does not protect against dangling native pointers; once the native struct is freed, any write through it corrupts whatever memory the allocator has reused at that address.
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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Local access required to invoke JVM methods; no system privileges needed; no confidentiality impact; high integrity and availability from heap corruption and JVM crash.
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
zstd-jni versions before 1.5.7-14 fail to validate closed state in setDict, setLongMax, setLevel and setRefMultipleDDicts methods of stream classes. Attackers can call these methods on closed streams to write through freed native pointers, corrupting unrelated objects or crashing the JVM.
Technical POC Analysis
Use-after-free (CWE-416) in luben/zstd-jni stream wrappers.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
zstd-jni, a Java compression library widely used in data processing and storage applications, contains a use-after-free vulnerability affecting versions 1.3.8-4 through 1.5.7-13 that enables attackers to crash Java Virtual Machines or corrupt application memory. Organizations using affected versions face unplanned service outages and potential data integrity compromise until patched releases are deployed.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Use-after-free in zstd-jni's Dictionary Sharing component allows remote attackers to corrupt native heap memory through
Out-of-bounds read in zstd-jni versions 1.2.0 through 1.5.7-13 allows attackers who can supply dictionary constructor pa
Out-of-bounds read in zstd-jni versions 1.2.0 through 1.5.7-13 exposes JVM-based applications to service termination and
Out-of-bounds read in zstd-jni versions 1.5.5-6 through 1.5.7-13 exposes JVM-based applications to memory disclosure or
Out-of-bounds memory reads in zstd-jni versions 1.1.1 through 1.5.7-13 allow unauthenticated remote attackers to crash t
Out-of-bounds memory access in zstd-jni versions 1.3.3-1 through 1.5.7-13 enables unauthenticated network-accessible att
Use-after-free in zstd-jni versions 1.3.8-4 through 1.5.7-13 allows attackers to trigger silent data corruption or JVM c
Infinite-loop denial of service in zstd-jni versions 1.4.8-4 through 1.5.7-13 allows thread starvation by passing negati
EUVD-2026-75024
GHSA-mwq5-v3w5-qr6v
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB