Skip to main content

zstd-jni CVE-2026-87825

| EUVDEUVD-2026-75023 HIGH
Use After Free (CWE-416)
2026-09-09 VulnCheck GHSA-9p7w-x2w6-p34j
7.0
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Control dictionary and stream lifecycle in shared code
  2. Delivery
    Associate dictionary with active decompression/compression stream
  3. Exploit
    Close dictionary before stream operations complete
  4. Execution
    Stream JNI call dereferences freed native memory
  5. Impact
    Silent data corruption or JVM crash (SIGSEGV)

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 three simultaneous conditions: (1) the application must use zstd-jni's dictionary API - specifically ZstdDictDecompress or ZstdDictCompress loaded into a ZstdInputStreamNoFinalizer or ZstdOutputStreamNoFinalizer; (2) dictionary close must race with or occur after dictionary association but before stream operations complete, which in single-threaded applications requires an explicit programming error and in multi-threaded applications can arise from unsynchronized dictionary lifecycle management; (3) the application must run zstd-jni 1.3.8-4 through 1.5.7-13. Applications that do not use dictionaries are completely unaffected. The AV:L vector confirms exploitation occurs within the local JVM process; remote attackers cannot trigger this directly without already controlling application code paths. Standard dictionary-free zstd compression/decompression streams are not vulnerable.

Impact

The CVSS 4.0 base score of 7.0 with AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H accurately reflects a local-vector vulnerability with high integrity and availability impact but no confidentiality exposure. Real-world risk is context-dependent: exploitation requires application code that both uses dictionary-based compression and races a dictionary close against active stream operations, which is an uncommon but plausible pattern in multi-threaded JVM data pipelines (e.g., Kafka consumers/producers with shared dictionary objects). EPSS data is not provided. There is no CISA KEV listing and no public exploit has been identified at time of analysis. The practical severity is elevated for data-intensive JVM applications that use shared dictionaries across threads - silent data corruption is harder to detect than a crash and could persist in storage. For applications using zstd-jni without dictionaries, there is no exposure. The CVSS vector correctly applies AV:L because exploitation occurs within the JVM process rather than over a network.

Exploit ScenarioDerived

In a multi-threaded Kafka consumer application using a shared ZstdDictDecompress object to decompress incoming messages, one thread calls dict.close() after what it believes is the last use, while a concurrent decompression thread has already loaded the dict into a stream but not yet completed its read operations. The stream's native zstd context now references freed native memory; the subsequent read call silently returns corrupted decompressed data or triggers a JVM crash via SIGSEGV in the native zstd library. No public exploit code exists, but the race condition is deterministically reproducible given control over dictionary and stream lifecycle ordering.

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

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

Alert me

AnalysisAIv1 – Sep 09, 2026

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 crashes by closing a Zstandard dictionary after it has been associated with a stream or context. The library's locking design released the dictionary's shared lock immediately after the load call, leaving the stream holding a native pointer to freed memory; subsequent read or write operations on that stream then access freed native heap, producing undefined behavior at the JVM/native boundary. No public exploit has been identified at time of analysis, and a patched release (v1.5.7-14) is available with two upstream commits.

RemediationAI

Upgrade zstd-jni to v1.5.7-14 or later, released at https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14. This version retains the dictionary's shared lock for the full stream lifetime and adds closed-state guards throughout ZstdInputStreamNoFinalizer and ZstdOutputStreamNoFinalizer. The fix is delivered via three commits (393d7311, a560131d, 0827ed02) applied to the upstream repository. If immediate upgrade is not possible, the compensating control is to ensure dictionary objects are never closed while any stream or context that loaded them is still open - enforced via application-level reference counting or by scoping dictionary lifecycles strictly within try-with-resources blocks that outlive all associated streams. This workaround has a trade-off: it requires auditing all usages of ZstdDictDecompress and ZstdDictCompress across the codebase, which is error-prone in large multi-threaded applications. Disabling dictionary-based compression entirely eliminates the attack surface at the cost of reduced compression ratios.

Affected VersionsENISA

zstd-jni 1.3.8-4 <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:*:*:*:*:*:*:*:*) provides Java Native Interface bindings to the Zstandard (zstd) C library, enabling JVM applications to perform high-speed compression and decompression. The library optionally accepts pre-trained compression/decompression dictionaries to improve ratios on repetitive data. Dictionaries are reference-counted via a shared-lock mechanism; the CWE-416 (Use After Free) root cause is that the shared lock was acquired and immediately released during the dictionary load call in ZstdInputStreamNoFinalizer and ZstdOutputStreamNoFinalizer, rather than held for the entire lifetime of the associated stream. This meant the native dictionary object could be freed (via dict.close()) by another thread while the stream still held a raw native pointer, causing subsequent JNI calls into the zstd C library to dereference freed memory. The fix (commits 393d7311 and a560131d) retains the shared lock in active_dict until the stream itself is closed, adds closed-state guard checks before every sensitive operation, and properly releases the previous active_dict lock when a new dictionary is loaded.

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 7.0 HIGH
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
vuln.today AI 7.7 HIGH

AV:L because exploitation occurs within the JVM process; AC:L because dictionary close before stream read is deterministically triggerable; no confidentiality impact as freed memory access produces corruption, not disclosure.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
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 contains a use-after-free vulnerability where streams and contexts hold a dictionary's shared lock only during the load call, allowing the dictionary to be closed while still referenced. Attackers can close a dictionary after associating it with a stream or context, causing subsequent read or write operations to access freed native memory, resulting in silent data corruption or JVM crashes.

Technical POC Analysis

CWE-416 use-after-free in the Java locking layer of com.github.luben: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 compression library integrated into Java applications, contains a use-after-free vulnerability in versions 1.3.8-4 through 1.5.7-13 that risks silent data corruption or unexpected JVM crashes during normal operation. Organizations using affected versions face integrity loss and service disruption until patched to version 1.5.7-14.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
core JNI compression library in Kafka, Spark, Cassandra stacks
Data Quality
5 sources
Confidence: Medium

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.1%
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
Small
Automatable· derived
No
Human Impact
High

Priority Score

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

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.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Tumbleweed Fixed

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