# CVE-2026-59949: lz4-java OOB read and NULL pointer dereference in XXHash JNI

Source: https://junglewise.ai/threats/cve-2026-59949-lz4-java-oob-read-and-null-pointer-dereference-in-xxhash-jni  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-18. Updated: 2026-07-24  
License: CC BY 4.0 with a link back

CVE-2026-59949 · Severity: medium · CVSS 6.5 · Published 2026-08-18

lz4-java is a popular compression library for Java applications. A vulnerability in its XXHash hashing component allows an attacker to crash the application (denial of service) or potentially view sensitive memory by providing malformed data ranges. This could lead to service outages or minor data exposure in systems that allow users to specify data offsets or lengths for hashing.

Technologies: [at.yawk.lz4:lz4-java (Maven)](https://junglewise.ai/threats/technologies/at-yawk-lz4-lz4-java), [org.lz4:lz4-java (Maven)](https://junglewise.ai/threats/technologies/org-lz4-lz4-java). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

**Is CVE-2026-59949 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59949 being exploited in the wild.

**How severe is CVE-2026-59949?** Medium severity, with a CVSS score of 6.5, published 18 August 2026.

**Which products and versions are affected?** at.yawk.lz4:lz4-java (Maven) <= 1.11.0, ECOSYSTEM:introduced=0,fixed=1.11.1; org.lz4:lz4-java (Maven) <= 1.8.1, ECOSYSTEM:introduced=0,last_affected=1.8.1; Yawk Lz4-Java <= 1.11.0.

**Is there a fix for CVE-2026-59949?** Yes. at.yawk.lz4:lz4-java (Maven): upgrade to 1.11.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59949 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59949?** Check whether you run at.yawk.lz4:lz4-java (Maven), org.lz4:lz4-java (Maven) or Yawk Lz4-Java at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- at.yawk.lz4:lz4-java (Maven): upgrade to 1.11.1 or later

  ```sh
  # set at.yawk.lz4:lz4-java to 1.11.1 in your pom.xml or build.gradle
  ```


## Technical details

The JNI-backed XXHash implementations in lz4-java fail to properly validate byte array references, offsets, and lengths before passing them to native code. Specifically, the streaming JNI implementations lacked validation for 'bytes', 'off', or 'len' arguments, while non-streaming implementations failed to catch null arrays when the length was zero. An attacker who can control these parameters can trigger a NULL pointer dereference (CWE-476) or an out-of-bounds read (CWE-125), leading to a fatal JVM crash or potential exposure of in-process memory. The issue is fixed in version 1.11.1 by adding proper range and null checks before JNI calls.

## Affected products

- at.yawk.lz4 lz4-java <= 1.11.0
- org.lz4 lz4-java <= 1.8.1

## Identifiers

- CVE-2026-59949
- GHSA-xx22-p4ch-683r

## Timeline

- 2026-07-06: disclosed
- 2026-07-24: advisory: GitHub Advisory published
- 2026-07-24: patched

## References

- [https://api.github.com/users/sectroyer](https://api.github.com/users/sectroyer)
- [https://github.com/sectroyer](https://github.com/sectroyer)
- [https://api.github.com/users/sectroyer/gists%7B/gist_id%7D](https://api.github.com/users/sectroyer/gists%7B/gist_id%7D)
- [https://api.github.com/users/sectroyer/repos](https://api.github.com/users/sectroyer/repos)
- [https://avatars.githubusercontent.com/u/6706818?v=4](https://avatars.githubusercontent.com/u/6706818?v=4)
- [https://api.github.com/users/sectroyer/events%7B/privacy%7D](https://api.github.com/users/sectroyer/events%7B/privacy%7D)

## Related threats

- [yawkat LZ4 Java heap exhaustion in decompressor](https://junglewise.ai/threats/cve-2026-106453-yawkat-lz4-java-provides-lz4-compression-for-java-prior-to-1-11)
- [yawkat LZ4 Java heap exhaustion in LZ4BlockInputStream](https://junglewise.ai/threats/cve-2026-106452-yawkat-lz4-java-provides-lz4-compression-for-java-prior-to-1-11)
- [yawkat LZ4 Java insecure temporary file handling in native library loading](https://junglewise.ai/threats/cve-2026-106451-yawkat-lz4-java-provides-lz4-compression-for-java-from-1-7-0)
- [yawkat LZ4 Java resource exhaustion in LZ4FrameInputStream](https://junglewise.ai/threats/cve-2026-106450-yawkat-lz4-java-provides-lz4-compression-for-java-prior-to-1-11)
- [yawkat LZ4 Java: LZ4BlockInputStream with stopOnEmptyBlock=false recurses once per empty block, causing StackOverflowError](https://junglewise.ai/threats/cve-2026-106449-yawkat-lz4-java-provides-lz4-compression-for-java-prior-to-1-11)
