CVE Database›Document archive›CVE-2026-59949

CVE-2026-59949

lz4-java: lz4-java: Denial of Service via insufficient validation in XXHash JNI implementations

Loading…

Severity

Moderate

Red Hat Product Security

—

CVSS

Review impact separately from score.

Published · July 24, 2026

Updated · October 16, 2026

Description

A flaw was found in lz4-java. Insufficient validation of byte array arguments in its Java Native Interface (JNI)-based XXHash implementations allows an attacker to crash the Java Virtual Machine (JVM) by providing invalid input. This can lead to a denial of service, making the affected application unavailable. In some cases, this flaw could also lead to the exposure of in-process data due to out-of-bounds memory reads.

Statement

A flaw was found in the lz4-java library's JNI-backed XXHash implementations. The native XXHash methods (hash32, hash64, streamingHash32, streamingHash64) obtained via XXHashFactory.nativeInstance() do not properly validate byte array arguments, offsets, and lengths before passing them to native code. An attacker able to control these parameters can pass null arrays or out-of-bounds ranges, causing a fatal JVM crash (denial of service) and potentially reading process memory beyond array bounds. The Java-based implementations obtained via XXHashFactory.safeInstance() or XXHashFactory.fastestJavaInstance() are not affected.

Mitigation

Use XXHashFactory.safeInstance() or XXHashFactory.fastestJavaInstance() instead of XXHashFactory.nativeInstance() to avoid the JNI boundary. Alternatively, validate that arrays are non-null and that offset and length parameters describe a range fully contained in the array before calling native XXHash methods.

CVSS / CWE

CWE-125 · Out-of-bounds Read