ZeroHour

CVE-2026-87825

large

Use-after-free in zstd-jni dictionary handling can corrupt data or crash JVMs

CVSS 4.0
7.0 high
EPSS
<1%p3
Published
()
Modified
AI analysis

zstd-jni before 1.5.7-14, the Java JNI binding for the Zstandard (zstd) compression library, contains a use-after-free (CWE-416): streams and compression contexts hold a dictionary's shared lock only during the load call, so the dictionary can be freed while still in use. An attacker, or simply buggy application code, can close a dictionary after it has been associated with a stream or context, causing later read or write operations to access freed native memory. The result is silent corruption of compressed or decompressed data or outright JVM crashes, with high integrity and availability impact and no confidentiality impact per the CVSS 4.0 score of 7, which uses a local attack vector. Any application or service embedding an affected zstd-jni version is affected, particularly data-processing and streaming workloads that use compression dictionaries. There is currently no public proof of concept, the issue is not in CISA KEV, and no in-the-wild exploitation is known.

What to do: Upgrade zstd-jni to 1.5.7-14 or later. Until then, review application code to ensure dictionaries are never closed while any stream or context still references them, and treat unexplained data corruption or JVM crashes in compression paths as possible symptoms. Audit dependency trees (e.g., mvn dependency:tree or Gradle equivalents) for transitive zstd-jni versions bundled inside frameworks and clients.

Affected
zstd-jni (open-source project) zstd-jniall versions before 1.5.7-14
Estimated exposure
large≈100,000–1,000,000 JVM deployments embed the library (it ships as a dependency of widely deployed JVM data platforms) — No install counts were provided in the data; this order-of-magnitude estimate is based on deployment patterns — zstd-jni is a common transitive dependency of heavily deployed JVM software such as Kafka's Java clients, Apache Spark and…

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

Weakness
CWE-416
Vector
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/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.