Every CVE Search/ Get API key

CVE-2026-106451

yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user

7.3 HighFix available

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.11%Unchanged since Oct 7, 2026
90%50%10%1%

What each source reports

CVE List Score used 7.3

yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Record
CVE-2026-106451
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-367, CWE-377
Updated
2026-11-02
EUVDEUVD-2026-93868 7.3

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Record
EUVD-2026-93868
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-mcr4-qmvw-px4g 7.3

yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user

Summary

When 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.

Details

tempLibLock = File.createTempFile("liblz4-java-", "." + os().libExtension + ".lck");
tempLib = new File(tempLibLock.getAbsolutePath().replaceFirst(".lck$", ""));
// copy to tempLib
try (FileOutputStream out = new FileOutputStream(tempLib)) { ... }
...
System.load(tempLib.getAbsolutePath());

Only 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.

In 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.

Whether this can be exploited depends on the host:

  • 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.
  • 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.
  • A symlink variant is blocked by fs.protected_symlinks = 1.
  • Temporary directories without the sticky bit, or shared across users in containers, are exploitable whatever these settings are.

This behaviour was introduced upstream in commit c3ddae5 (lz4-java 1.7.0), which swapped which of the two files is created with createTempFile.

Impact

A 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.

The 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.

Patch

Fixed 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.

For 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.

Record
GHSA-mcr4-qmvw-px4g
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-367, CWE-377
Updated
2026-11-02
NVD 7.3

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Record
CVE-2026-106451
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness
CWE-367, CWE-377
Updated
2026-11-02
OSV 7.3

yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Record
CVE-2026-106451
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-367, CWE-377
Updated
2026-11-02
OSVDEBIAN-CVE-2026-106451 7.3

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Record
DEBIAN-CVE-2026-106451
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Updated
2026-11-02
OSVGHSA-mcr4-qmvw-px4g 7.3

yawkat LZ4 Java: Native library extraction to a shared temporary directory is vulnerable to file replacement by another local user

Summary

When 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.

Details

tempLibLock = File.createTempFile("liblz4-java-", "." + os().libExtension + ".lck");
tempLib = new File(tempLibLock.getAbsolutePath().replaceFirst(".lck$", ""));
// copy to tempLib
try (FileOutputStream out = new FileOutputStream(tempLib)) { ... }
...
System.load(tempLib.getAbsolutePath());

Only 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.

In 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.

Whether this can be exploited depends on the host:

  • 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.
  • 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.
  • A symlink variant is blocked by fs.protected_symlinks = 1.
  • Temporary directories without the sticky bit, or shared across users in containers, are exploitable whatever these settings are.

This behaviour was introduced upstream in commit c3ddae5 (lz4-java 1.7.0), which swapped which of the two files is created with createTempFile.

Impact

A 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.

The 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.

Patch

Fixed 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.

For 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.

Record
GHSA-mcr4-qmvw-px4g
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-367, CWE-377
Updated
2026-11-02
OSVUBUNTU-CVE-2026-106451 7.3

yawkat LZ4 Java provides LZ4 compression for Java. From 1.7.0 until 1.11.4, net.jpountz.util.Native.load() uses File.createTempFile to create an exclusive temporary .lck file but derives the native-library path by removing the suffix, then FileOutputStream opens that predictable path without exclusive creation, allowing another local user with access to the same shared temporary directory to create or replace the library file before System.load() uses it. Successful exploitation depends on shared-directory permissions, host protections, and winning the race, and can execute native code as the victim; hardened systems may instead cause library loading to fail and fall back to Java implementations. Configurations using a system library, a private java.io.tmpdir, or Java-only implementations are not affected. This issue is fixed in version 1.11.4.

Record
UBUNTU-CVE-2026-106451
CVSS 4.0
7.3 HighCVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-02
OSVROOT-APP-MAVEN-CVE-2026-106451 No score

CVE-2026-106451 in at.yawk.lz4:lz4-java - Patched by Root

Root has patched CVE-2026-106451 in the at.yawk.lz4:lz4-java package for Root:Maven. Multiple fixed versions available.

Record
ROOT-APP-MAVEN-CVE-2026-106451
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
at.yawk.lz4:lz4-java
Maven
through 1.11.3
1.11.4
org.lz4:lz4-java
Maven
1.7.0 to 1.8.1 None known
lz4-java
Debian:12
All versions, plus listed versions
1.11.2+ds1-11.11.2+ds1-21.11.2+ds1-31.8.0-31.8.0-4
None known
lz4-java
Debian:13
All versions, plus listed versions
1.11.2+ds1-11.11.2+ds1-21.11.2+ds1-31.8.0-4
None known
lz4-java
Debian:14
All versions, plus listed versions
1.11.2+ds1-11.11.2+ds1-21.11.2+ds1-31.8.0-4
None known
at.yawk.lz4:lz4-java
Maven
before 1.11.4, plus listed versions
1.10.01.10.11.10.21.10.31.10.4
Show 6 moreShow less
1.11.01.11.11.11.21.11.31.8.11.9.0
1.11.4
org.lz4:lz4-java
Maven
1.7.0 to 1.8.1, plus listed versions
1.7.11.8.0
None known
at.yawk.lz4:lz4-java
Root:Maven
before 1.11.1-aikido.1
1.11.1-aikido.11.10.1-aikido.11.11.1-aikido.21.11.2-aikido.11.11.3-aikido.1
io.root.at.yawk.lz4:lz4-java
Root:Maven
before 1.11.1-root.io.1
1.11.1-root.io.11.10.1-root.io.11.11.1-root.io.21.11.2-root.io.11.11.3-root.io.1
lz4-java
Ubuntu:20.04:LTS
All versions, plus listed versions
1.5.1-2
None known
Show 4 moreShow less
Affected packages
PackageAffectedFixed
lz4-java
Ubuntu:22.04:LTS
All versions, plus listed versions
1.5.1-3build1
None known
lz4-java
Ubuntu:24.04:LTS
All versions, plus listed versions
1.8.0-31.8.0-41.8.0-4build1
None known
lz4-java
Ubuntu:26.10
All versions, plus listed versions
1.8.0-4build2
None known
lz4-java
Ubuntu:26.04:LTS
All versions, plus listed versions
1.8.0-4build11.8.0-4build2
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-106451 is a high vulnerability (CVSS 7.3) in Yawkat Lz4-java, published October 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.11%, the 1st percentile. Fixed in at.yawk.lz4:lz4-java 1.11.4.

References

Show 4 moreShow less
MoveEnter Open