-Infinity
0

Vendor Risk Score

See how lz4 compares to other vendors in security performance

View Risk Score →

Software

https://sites.google.com/sonatype.com/vulnerabilities/cve-2025-12183 discloses: Summary -------

Various lz4-java compression and decompression implementations do not guard against out-of-bounds memory access. Untrusted input may lead to denial of service and information disclosure.

Vulnerable Maven coordinates:

org.lz4:lz4-java up to and including 1.8.0 org.lz4:lz4-pure-java up to and including 1.8.0 net.jpountz.lz4:lz4 up to and including 1.8.0

Severity rating & weakness enumeration --------------------------------------

Rating: High - 8.8

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N

CWE-125: Out-of-bounds Read

Technical Description ---------------------

lz4-java provides a matrix of compression and decompression algorithms:

- A JNI-based implementation based on the lz4 library (LZ4Factory.nativeInstance(), LZ4Factory.fastestInstance())

- A Java implementation using the deprecated sun.misc.Unsafe API (LZ4Factory.unsafeInstance(), LZ4Factory.fastestInstance(), LZ4Factory.fastestJavaInstance())

- A Java implementation without sun.misc.Unsafe (LZ4Factory.safeInstance())

Each of these variants has:

- A "fast" decompressor

- A "safe" decompressor

- Compressors for various compression levels

The JNI "fast" decompressor is based on the LZ4decompressfast API of the lz4 C library. This function is deprecated because it lacks bounds checks and is insecure on untrusted input. Other JNI-based APIs (the safe decompressor and the compressors) are not vulnerable.

All Java-based implementations lack sufficient bounds checks. For the sun.misc.Unsafe-based implementations, this can lead to denial of service and information disclosure. For the normal Java implementations, this only leads to ArrayIndexOutOfBoundsExceptions and is not a vulnerability.

Workaround ----------

The vulnerability can be resolved without patching:

- Applications using LZ4Factory.nativeInstance() in conjunction with .fastDecompressor() can switch to .safeInstance() in the short term. In the long term, it is recommended to switch to .safeDecompressor(), which is not vulnerable and provides better performance (despite the name).

- Applications using LZ4Factory.unsafeInstance(), .fastestInstance() or .fastestJavaInstance() (Unsafe-based implementations) can switch to .safeInstance().

Patch ----- Because the maintainer of the official lz4-java library is unavailable, the lz4 organization has decided to discontinue the project.

A community-maintained fork of lz4-java is available at https://github.com/yawkat/lz4-java. Two new versions have been released.

at.yawk.lz4:lz4-java:1.8.1 implements the workarounds listed above. The JNI-based fast decompressor is replaced with the safe Java implementation. All sun.misc.Unsafe-based compressors and decompressors are replaced with their safe counterparts. New unsafeInsecureInstance and nativeInsecureInstance factory methods were added for the insecure implementations for applications that operate on trusted input only. This version is directly based on 1.8.0 and only includes the minimum changes necessary to fix the vulnerability.

at.yawk.lz4:lz4-java:1.9.0 adds a reworked build system, updates to the underlying lz4 library (not security-related), and various fixes for the Java implementations. The changes from 1.8.1 remain. The Unsafe-based implementation may be made available by default again in a future release, once there is confidence in the security of the patched implementation.

org.lz4:lz4-java:1.8.1 is a relocation pom pointing to at.yawk.lz4:lz4-java:1.8.1, provided by Sonatype. Users that upgrade to the former coordinates will get the latter artifact, and a warning to update their maven coordinates. Future releases (including 1.9.0) will only be published under the at.yawk.lz4 group ID.

Credits -------

Jonas Konrad (Oracle corp.): Discovery and patch

Marcono1234: Patch and review

Sonatype: Disclosure coordination; Relocation pom https://github.com/lz4/lz4-java has been updated with:> Note: The official lz4-java project has been discontinued. A community fork is available here <https://github.com/yawkat/lz4-java>. To address CVE-2025-12183, Sonatype has added a redirect from org.lz4:lz4-java:1.8.1 to the new group ID.

Severity
5.9
AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H

LZ4 through 1.10.0 allows attackers to cause a denial of service (application crash) or possibly have unspecified other impact when the application processes untrusted LZ4 frames. For example, LZ4FcreateCDictadvanced in lib/lz4frame.c mishandles NULL checks.

1 / 2
Source: Microsoft
First published (updated )
Severity
7.1
Use After Free
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the Linux kernel, the following vulnerability has been resolved:

lz4: fix LZ4decompresssafepartial read out of bound

When partialDecoding, it is EOF if we've either filled the output buffer or can't proceed with reading an offset for following match.

In some extreme corner cases when compressed data is suitably corrupted, UAF will occur. As reported by KASAN [1], LZ4decompresssafepartial may lead to read out of bound problem during decoding. lz4 upstream has fixed it [2] and this issue has been disscussed here [3] before.

current decompression routine was ported from lz4 v1.8.3, bumping lib/lz4 to v1.9.+ is certainly a huge work to be done later, so, we'd better fix it first.

[1] https://lore.kernel.org/all/000000000000830d1205cf7f0477@google.com/ [2] https://github.com/lz4/lz4/commit/c5d6f8a8be3927c0bec91bcc58667a6cfad244ad# [3] https://lore.kernel.org/all/CC666AE8-4CA4-4951-B6FB-A2EFDE3AC03B@fb.com/

1 / 3
Source: NVD
First published (updated )
Severity
4
Integer Overflow

Don A. Bailey of Lab Mouse Security reported an integer overflow issue in various implementations of LZO (Lempel–Ziv–Oberhumer) and LZ4 compression algorithms. The issue is in the handling of "literal runs" during decompression, and can lead to application crash and, possibly, code execution.

This bug is for LZ4 and LZ4 copy embedded in the Linux kernel (as of version 3.11).

This issue can not be triggered on 64bit systems today, as it would require input of the size that is beyond capabilities of modern computers. On 32bit systems, this can only affect applications using sufficiently large decompression blocks (16mb+).

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203