CVE-2025-59343 tar-fs has a symlink validation bypass if destination directory is predictable with a specific tarball

High 8.7 Published Updated

Attackers can bypass symlink validation in tar-fs to write files outside the intended directory if the destination path is predictable.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-59343?

CVE-2025-59343 is a high-severity path traversal vulnerability in mafintosh tar-fs, published on 24 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

tar-fs provides filesystem bindings for tar-stream. Versions prior to 3.1.1, 2.1.3, and 1.16.5 are vulnerable to symlink validation bypass if the destination directory is predictable with a specific tarball. This issue has been patched in version 3.1.1, 2.1.4, and 1.16.6. A workaround involves using the ignore option on non files/directories.

Weakness: CWE-61, CWE-22

Which versions are affected by CVE-2025-59343?

6 open source packages ship an affected version, including tar-fs.

PackageAffectedFixed in
tar-fs npmAll versions1.16.6
tar-fs npmAll versions1.16.6
tar-fs npmFrom 2.0.02.1.4
tar-fs npmFrom 2.0.02.1.4
tar-fs npmFrom 3.0.03.1.1
tar-fs npmFrom 3.0.03.1.1

How do I fix CVE-2025-59343?

Upgrade tar-fs to a fixed version for your release line: 1.16.6, 2.1.4 or 3.1.1.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-59343 being exploited?

There is no known exploitation of CVE-2025-59343 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2025-59343, DLA-4313-1, DSA-6013-1, ECHO-2e8d-40a9-3ad3, GHSA-vj76-c3g6-qr5v, MINI-3cj6-3x8r-r2rj and 11 more.

Is CVE-2025-59343 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free