CVE-2025-66566: yawkat LZ4 Java has a possible information leak in Java safe decompressor

Published Dec 5, 2025
·
Updated

Summary

Insufficient clearing of the output buffer in Java-based decompressor implementations in lz4-java 1.10.0 and earlier allows remote attackers to read previous buffer contents via crafted compressed input. In applications where the output buffer is reused without being cleared, this may lead to disclosure of sensitive data.

JNI-based implementations are not affected.

Details

During the decompression process, the lz4 algorithm may have to repeat data that was previously decompressed in the same input frame. In the Java implementation, this is implemented by copy operations within the output buffer.

With a crafted input, an attacker may induce the Java implementation to copy from a region in the output buffer that does not contain decompressed data yet. If that region contains sensitive information because the output buffer was not cleared prior to decompression, that data will then be copied to the decompressed output.

- LZ4Factory.nativeInstance().safeDecompressor() is not affected. - LZ4Factory.nativeInstance().fastDecompressor() is affected because it actually uses safeInstance() since 1.8.1. In 1.8.0 and earlier versions, this implementation is instead vulnerable to the more severe CVE‐2025‐12183, so downgrading is not a solution. - Both decompressors of LZ4Factory.safeInstance(), LZ4Factory.unsafeInstance() and LZ4Factory.fastestJavaInstance() are affected. - LZ4Factory.fastestInstance() uses the nativeInstance or fastestJavaInstance depending on platform. LZ4Factory.fastestInstance().fastDecompressor() is always affected, while LZ4Factory.fastestInstance().safeDecompressor() is affected only when JNI cannot be used (e.g. on unsupported platforms).

Independent of this vulnerability, it is recommended that users migrate from fastDecompressor to safeDecompressor, as the latter is more performant (despite the name).

The impact of this vulnerability depends on how user code interacts with the decompression API. Users that allocate a new destination buffer each time, or use only zeroed buffers, are not impacted. When the buffer is reused, however, the confidentiality impact can be severe. This vulnerability is marked as VC:H out of caution.

Mitigation

lz4-java 1.10.1 fixes this issue without requiring changes in user code.

If you cannot upgrade to 1.10.1, you can mitigate this vulnerability by zeroing the output buffer before passing it to the decompression function.

Relation to CVE‐2025‐12183

This CVE is a different attack than CVE‐2025‐12183, affecting different implementations with different impact. This new vulnerability was discovered by CodeIntelligence during research that followed up on CVE‐2025‐12183. Users are recommended to upgrade to 1.10.1 to fix both vulnerabilities.

Other sources

yawkat LZ4 Java provides LZ4 compression for Java. Insufficient clearing of the output buffer in Java-based decompressor implementations in lz4-java 1.10.0 and earlier allows remote attackers to read previous buffer contents via crafted compressed input. In applications where the output buffer is reused without being cleared, this may lead to disclosure of sensitive data. JNI-based implementations are not affected. This vulnerability is fixed in 1.10.1.

— MITRE

Affected Software

5 affected componentsFixes available
maven/yawkat/lz4-java<1.10.0
maven/net.jpountz.lz4:lz4<=1.8.1
maven/org.lz4:lz4-pure-java<=1.8.1
maven/org.lz4:lz4-java<=1.8.1
maven/at.yawk.lz4:lz4-java<=1.10.0
1.10.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/at.yawk.lz4:lz4-java to a version that resolves this vulnerability.

    Fixed in 1.10.1
  2. Upgrade

    Upgrade lz4-java to a version that resolves this vulnerability.

    Fixed in 1.10.1
  3. Compensating control

    If upgrading to 1.10.1 is not possible, zero the output buffer before passing it to the decompression function; allocate a new destination buffer for each operation or use only zeroed buffers.

Event History

Dec 5, 2025
CVE Published
via MITRE·06:10 PM
Data Sourced
via MITRE·06:10 PM
DescriptionWeakness
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:54 PM
Data Sourced
via GitHub·06:54 PM
DescriptionWeaknessAffected Software
Data Sourced
via Red Hat·07:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-66566?

CVE-2025-66566 is classified as a high severity vulnerability due to its potential to leak sensitive information.

2

How do I fix CVE-2025-66566?

To fix CVE-2025-66566, update to version 1.10.1 or later of the lz4-java library where the buffer clearing issue has been resolved.

3

What kind of attack does CVE-2025-66566 allow?

CVE-2025-66566 allows remote attackers to read previous buffer contents through crafted compressed input.

4

Which versions of lz4-java are affected by CVE-2025-66566?

CVE-2025-66566 affects lz4-java version 1.10.0 and earlier.

5

What components are impacted by CVE-2025-66566?

CVE-2025-66566 impacts Java-based decompressor implementations in the lz4-java library.

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