Repository navigation
fix(deps): update dependency at.yawk.lz4:lz4-java to v1.11.1 [security] - #976
Merged
Merged
Conversation
dkropachev
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.11.0→1.11.1LZ4 Java: Native XXHash implementations can crash the JVM when passed invalid byte array ranges
CVE-2026-59949 / GHSA-xx22-p4ch-683r
More information
Details
Summary
Insufficient validation of byte array arguments in JNI-based XXHash implementations in lz4-java 1.11.0 and earlier allows callers to crash the JVM by passing an invalid array reference or invalid range to native XXHash methods.
This affects applications where an attacker can influence the byte array object or the
off/lenarguments passed to affected XXHash APIs. It does not affect the common case where only the contents of a valid byte array are attacker-controlled.Java-based XXHash implementations are not affected.
Details
The JNI-backed XXHash implementations pass caller-provided byte array arguments to native code. The affected APIs are:
XXHashFactory.nativeInstance().hash32().hash(byte[] buf, int off, int len, int seed)XXHashFactory.nativeInstance().hash64().hash(byte[] buf, int off, int len, long seed)XXHashFactory.nativeInstance().newStreamingHash32(seed).update(byte[] bytes, int off, int len)XXHashFactory.nativeInstance().newStreamingHash64(seed).update(byte[] bytes, int off, int len)Before the fix, the streaming JNI implementations did not validate
bytes,off, orlenbefore callingXXHashJNI.XXH32_update/XXHashJNI.XXH64_update. The non-streaming JNI implementations calledSafeUtils.checkRange, butSafeUtils.checkRange(byte[], int, int)skipped all array access whenlen == 0, so a null byte array with a zero length could still reach JNI.As a result:
hash(null, 0, 0, seed)andupdate(null, 0, 0)could pass a null array reference to JNI, causing a fatal JVM crash inGetPrimitiveArrayCritical.update(new byte[16], 0, Integer.MAX_VALUE)could cause native XXHash code to read far beyond the end of the Java array, causing a fatal JVM crash and potentially exposing in-process memory to the native routine before the crash.The oversized-length non-streaming
hash(new byte[16], 0, Integer.MAX_VALUE, seed)case was already rejected in Java before this fix. The missing validation affected the streaming oversized-length case and the zero-length null-array case for both streaming and non-streaming JNI XXHash APIs.The impact of this vulnerability depends on how user code uses the XXHash API. Code that hashes attacker-controlled byte contents in a valid, correctly bounded array is not affected. Code may be affected if an attacker can cause the application to pass a null array, an attacker-controlled offset, or an attacker-controlled length to the native XXHash API. The primary impact is denial of service due to JVM termination. For oversized lengths, native code may also read outside the Java array before the process crashes.
Mitigation
lz4-java 1.11.1 fixes this issue without requiring changes in user code.
If you cannot upgrade, avoid passing attacker-controlled array references, offsets, or lengths to JNI-backed XXHash APIs. In particular, validate that arrays are non-null and that
offandlendescribe a range fully contained in the array before calling native XXHash methods.Using
XXHashFactory.safeInstance()avoids the JNI boundary and is not affected by this native crash behavior.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
yawkat/lz4-java (at.yawk.lz4:lz4-java)
v1.11.1: lz4-java v1.11.1Security release for CVE-2026-59949.
What's Changed
Full Changelog: yawkat/lz4-java@v1.11.0...v1.11.1
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.