Skip to content
OpenAdvisories
High · 7.5 Public exploit CVE-2024-12905 EUVD-2024-54315GHSA-pq67-2wwv-3xjx

tar-fs Vulnerable to Link Following and Path Traversal via Extracting a Crafted tar File

Published Mar 27, 2025 · Updated Nov 3, 2025 · Assigned by seal

Description

An Improper Link Resolution Before File Access ("Link Following") and Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package.

This issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.8.

Affected products

VendorProductAffectedFixed
— tar-fs 0.0.0 – < 1.16.4, 2.0.0 – < 2.1.2, 3.0.0 – < 3.0.8 1.16.4

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-tar-fs 3.0.8+~cs2.0.4-1 —
Debian 13 node-tar-fs 3.0.8+~cs2.0.4-1 —
Debian 12 node-tar-fs 2.1.3-0+deb12u1 —
Debian 11 node-tar-fs 2.1.3-0+deb11u1 DLA-4214-1
ReleasePackageFixed inAdvisory
Ubuntu 25.10 node-tar-fs 3.0.9+~cs2.0.4-1+deb13u1build0.25.10.1 USN-8367-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS node-tar-fs 2.1.1-6ubuntu0.24.04.1~esm1 USN-8367-1
Ubuntu Pro 22.04 LTS node-tar-fs 2.1.1-6ubuntu0.22.04.1~esm1 USN-8367-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) reaper 3.1.1-18 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling code-server 4.105.1-r1 —
Wolfi rolling sqlpad +1 7.5.3-r1 —
Wolfi rolling tileserver-gl +1 5.2.0-r1 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
npm tar-fs < 1.16.4 1.16.4 GHSA-pq67-2wwv-3xjx
npm tar-fs >= 2.0.0, < 2.1.2 2.1.2 GHSA-pq67-2wwv-3xjx
npm tar-fs >= 3.0.0, < 3.0.7 3.0.7 GHSA-pq67-2wwv-3xjx

Advisories 2

References