Skip to main content

zstd-jni CVE-2026-87877

| EUVDEUVD-2026-75024 HIGH
Use After Free (CWE-416)
2026-09-09 VulnCheck GHSA-mwq5-v3w5-qr6v
7.0
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Identify application using zstd-jni <1.5.7-14
  2. Delivery
    Trigger close() on a stream object
  3. Exploit
    Call setDict or other setter on closed stream
  4. Execution
    JNI write through freed native pointer
  5. Impact
    Corrupt 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% 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 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

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) 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

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

Local access required to invoke JVM methods; no system privileges needed; no confidentiality impact; high integrity and availability from heap corruption and JVM crash.

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 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
Medium
widely used in Java big-data ecosystems (Kafka, Spark, Hadoop)
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.2%
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
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

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

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