Vulnerabilities in pkg:maven/at.yawk.lz4/lz4-java
PACKAGECVE-2026-106451 is a HIGH native library extraction to a vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting yawkat LZ4 Java libraries in the Maven ecosystem. The issue involves native library extraction to a shared temporary directory is vulnerable to file replacement by another local user. Remediation is available by upgrading affected packages to version 1.11.4.
pkg:maven/at.yawk.lz4/lz4-java
Vulnerability advisories affecting package pkg:maven/at.yawk.lz4/lz4-java. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-mcr4-qmvw-px4g | CVE-2026-106451 | HIGH | yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user |
| GHSA-343h-94h5-c4wr | CVE-2026-106449 | LOW | yawkat LZ4 Java: LZ4BlockInputStream with stopOnEmptyBlock=false recurses once per empty block, causing StackOverflowError |
| GHSA-gm45-99xc-r7wv | CVE-2026-106450 | MODERATE | yawkat LZ4 Java: LZ4FrameInputStream reallocates block buffers for every frame, allowing CPU and GC amplification from small inputs |
| GHSA-4v53-57pg-c464 | CVE-2026-106452 | MODERATE | yawkat LZ4 Java: LZ4BlockInputStream allocates an unvalidated compressed length from the stream header |
| GHSA-6cx8-rjf8-pr8g | CVE-2026-106453 | MODERATE | yawkat LZ4 Java: LZ4DecompressorWithLength allocates the unvalidated size from the 4-byte length header, so a 5-byte input triggers a 1 GiB allocation and OutOfMemoryError |
| GHSA-xx22-p4ch-683r | CVE-2026-59949 | MODERATE | LZ4 Java: Native XXHash implementations can crash the JVM when passed invalid byte array ranges |
| GHSA-vqf4-7m7x-wgfc | CVE-2025-12183 | HIGH | LZ4 Java Compression has Out-of-bounds memory operations which can cause DoS |
| GHSA-cmp6-m4wj-q63q | CVE-2025-66566 | HIGH | yawkat LZ4 Java has a possible information leak in Java safe decompressor |
CVE-2026-106451 at a Glance
How to Fix CVE-2026-106451
To remediate this vulnerability, upgrade all affected yawkat LZ4 Java dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>1.11.4</version>
</dependency>
<dependency>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=at.yawk.lz4
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-106451, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=at.yawk.lz4
Analyze the terminal output to locate any version of yawkat LZ4 Java in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.4), your application is affected.
Note: The mvn dependency:tree -Dincludes=at.yawk.lz4 command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In yawkat LZ4 Java, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-106451 Affected yawkat LZ4 Java Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
at.yawk.lz4:lz4-java
|
Maven |
< 1.11.4
|
1.11.4
|
|
org.lz4:lz4-java
|
Maven |
≥ 1.7.0
≤ 1.8.1
|
|
References
Frequently Asked Questions
What is CVE-2026-106451?
Which yawkat LZ4 Java versions are affected?
What version fixes CVE-2026-106451?
Is lz4-java affected?
What CWE is associated with CVE-2026-106451?
How can I check Maven dependencies for CVE-2026-106451?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mcr4-qmvw-px4g",
"modified" : "2026-10-07T20:35:51Z",
"published" : "2026-10-07T20:35:51Z",
"aliases" : [ "CVE-2026-106451" ],
"summary" : "yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user",
"details" : "### Summary\n\nWhen no system-installed `liblz4-java` is found, `net.jpountz.util.Native.load()` extracts the bundled native library to `java.io.tmpdir` and loads it with `System.load`. The path of the extracted library can be predicted before it is created, and the library file is opened without exclusive creation. Another local user who can write to the same temporary directory can therefore create the file first and control the code that is loaded.\n\n### Details\n\n```java\ntempLibLock = File.createTempFile(\"liblz4-java-\", \".\" + os().libExtension + \".lck\");\ntempLib = new File(tempLibLock.getAbsolutePath().replaceFirst(\".lck$\", \"\"));\n// copy to tempLib\ntry (FileOutputStream out = new FileOutputStream(tempLib)) { ... }\n...\nSystem.load(tempLib.getAbsolutePath());\n```\n\nOnly the `.lck` file is created safely, with a random name and exclusive creation. The library path is the `.lck` name without the `.lck` suffix, and nothing reserves it. `new FileOutputStream(tempLib)` opens it with `O_CREAT|O_TRUNC` and follows symlinks.\n\nIn a shared, world-writable temporary directory, another user can watch for the `.lck` file and create the corresponding library file before it is opened. If they win that race, they own the file. The victim then writes into the attacker-owned file, and the attacker can overwrite it again before `System.load`.\n\nWhether this can be exploited depends on the host:\n\n- With `fs.protected_regular = 0`, the attacker can pre-create a world-writable file, and their code is then loaded into the victim's JVM.\n- With `fs.protected_regular >= 1` (the default on many systemd-based distributions), the victim's open fails. The library then fails to load and the library falls back to the Java implementations, so the attacker can only cause a denial of service.\n- A symlink variant is blocked by `fs.protected_symlinks = 1`.\n- Temporary directories without the sticky bit, or shared across users in containers, are exploitable whatever these settings are.\n\nThis behaviour was introduced upstream in commit c3ddae5 (lz4-java 1.7.0), which swapped which of the two files is created with `createTempFile`.\n\n### Impact\n\nA local user who can write to the same temporary directory as a victim process that uses the bundled JNI library may be able to execute code as the victim. Exploitation requires a shared temporary directory, host settings that permit it, and winning a race.\n\nThe issue does not apply if `liblz4-java` is found on `java.library.path`, if `java.io.tmpdir` is private to the user (for example systemd `PrivateTmp`, or a per-user temporary directory), or if only the Java implementations are used.\n\n### Patch\n\nFixed in lz4-java 1.11.4. The native library is now extracted directly into a file created by `File.createTempFile`, which has a random name and is created exclusively, so a file or symlink planted in advance cannot be reused. The `.lck` lock files are no longer used. Instead, the startup cleanup removes stale `liblz4-java-*` temporary files (including `.lck` files left by older versions) only once they are more than one hour old.\n\nFor older versions, the workaround is to set `java.io.tmpdir` to a directory writable only by the application user, or install `liblz4-java` on `java.library.path`.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "at.yawk.lz4:lz4-java"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.11.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.11.3"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.lz4:lz4-java"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.7.0"
}, {
"last_affected" : "1.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/yawkat/lz4-java/security/advisories/GHSA-mcr4-qmvw-px4g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-106451"
}, {
"type" : "WEB",
"url" : "https://github.com/yawkat/lz4-java/commit/7a48b7f6b8099b9dab6541e4ac2ee0979dc55aa3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/yawkat/lz4-java"
}, {
"type" : "WEB",
"url" : "https://github.com/yawkat/lz4-java/releases/tag/v1.11.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367", "CWE-377" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-07T20:35:51Z",
"nvd_published_at" : "2026-10-06T20:17:27Z"
}
}