CVE-2026-89045

Description

A flaw was found in zstd-jni. This vulnerability allows an attacker to trigger an infinite loop by providing negative length parameters to the ZstdInputStreamNoFinalizer.read() method. This can cause the read method to spin indefinitely, holding the stream monitor and blocking other threads from accessing the stream, ultimately leading to a Denial of Service (DoS) for the affected application.

Statement

Red Hat rates this Moderate, consistent with upstream's own CVSS 3.1 score of 4.0, for the same reason: the negative length has to come from the calling application's own logic, not from an attacker-controlled value received directly over a wire protocol.

Only the three-argument ZstdInputStreamNoFinalizer.read(byte[], int, int) overload is reachable this way; the caller has to already have a defect in its own length calculation, a bad remaining-bytes count for example, to hand zstd-jni a negative value in the first place, since InputStream's single-argument read() and read(byte[]) never produce one.

Where it is reachable, the failure is a single thread spinning and holding one stream instance's lock indefinitely, not memory corruption, data exposure, or privilege escalation, and it doesn't propagate to stream instances the hung caller isn't sharing. That combination, a caller-side prerequisite plus an impact bounded to one thread and one stream object, is why this stays Moderate rather than Important despite being a straightforward-looking DoS trigger on paper.

Mitigation

If your integration calls read(byte[], int, int) directly with a computed length, for example a remaining-bytes calculation, add a len >= 0 check before the call. If you can't change the call site, avoid sharing a single ZstdInputStreamNoFinalizer instance across threads or requests, so a bad input only stalls the one caller that triggered it instead of every other caller waiting on the same stream.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score4N/A4
Attack VectorLocalN/ALocal
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionNoneN/ANone
ScopeUnchangedN/AUnchanged
ConfidentialityNoneN/ANone
Integrity ImpactNoneN/ANone
Availability ImpactLowN/ALow

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

cve.org: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Amplification

An infinite loop will cause unexpected consumption of resources, such as CPU cycles or memory. The software's operation may slow down, or cause a long time to respond.

Frequently Asked Questions

Want to get errata notifications? Sign up here.