Skip to content

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

HighCVSS 7.5 EPSS 2.3% Public exploit
Published
Updated
Exploit status
Public exploit available
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
UbuntuDebian

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.

Upgrade path

9 packages: 9 fixed.

PackageAffectedFixed inStatus
cbl-mariner reaper(CBL-Mariner 2.0) < 3.1.1-18 3.1.1-18 Fixed
debian/node-tar-fs(Debian 12) < 2.1.3-0+deb12u1; = 2.1.1-6 2.1.3-0+deb12u1 Fixed
debian/node-tar-fs(Debian 13) < 3.0.8+~cs2.0.4-1 3.0.8+~cs2.0.4-1 Fixed
debian/node-tar-fs(Debian 14) < 3.0.8+~cs2.0.4-1 3.0.8+~cs2.0.4-1 Fixed
npm tar-fs(npm) < 1.16.4; >= 0.0.0, < 1.16.4; >= 2.0.0, < 2.1.2; >= 3.0.0, < 3.0.7 +1 more 1.16.4, 2.1.2, 3.0.7, 3.0.8 Fixed
ubuntu/node-tar-fs(Ubuntu 22.04) < 2.1.1-6ubuntu0.22.04.1~esm1 2.1.1-6ubuntu0.22.04.1~esm1 Fixed
ubuntu/node-tar-fs(Ubuntu 24.04) < 2.1.1-6ubuntu0.24.04.1~esm1 2.1.1-6ubuntu0.24.04.1~esm1 Fixed
ubuntu/node-tar-fs(Ubuntu Pro 22.04) < 2.1.1-6ubuntu0.22.04.1~esm1; = 2.1.1-2; = 2.1.1-4; = 2.1.1-6 2.1.1-6ubuntu0.22.04.1~esm1 Fixed
ubuntu/node-tar-fs(Ubuntu Pro 24.04) < 2.1.1-6ubuntu0.24.04.1~esm1; = 2.1.1-6 2.1.1-6ubuntu0.24.04.1~esm1 Fixed

Affected products

ProductAffected versionsFixed in
cbl-mariner reaper(CBL-Mariner:2.0) < 3.1.1-18 3.1.1-18
debian/node-tar-fs(Debian:12) < 2.1.3-0+deb12u1 2.1.3-0+deb12u1
debian/node-tar-fs(Debian:12) = 2.1.1-6 No fix listed
debian/node-tar-fs(Debian:13) < 3.0.8+~cs2.0.4-1 3.0.8+~cs2.0.4-1
debian/node-tar-fs(Debian:14) < 3.0.8+~cs2.0.4-1 3.0.8+~cs2.0.4-1
npm tar-fs(npm) < 1.16.4 1.16.4
npm tar-fs(npm) >= 2.0.0, < 2.1.2 2.1.2
npm tar-fs(npm) >= 3.0.0, < 3.0.7 3.0.7
ubuntu/node-tar-fs(Ubuntu:22.04) < 2.1.1-6ubuntu0.22.04.1~esm1 2.1.1-6ubuntu0.22.04.1~esm1
npm tar-fs(npm) >= 0.0.0, < 1.16.4 1.16.4
npm tar-fs(npm) >= 3.0.0, < 3.0.8 3.0.8
ubuntu/node-tar-fs(Ubuntu:24.04) < 2.1.1-6ubuntu0.24.04.1~esm1 2.1.1-6ubuntu0.24.04.1~esm1
ubuntu/node-tar-fs(Ubuntu:Pro:22.04) < 2.1.1-6ubuntu0.22.04.1~esm1 2.1.1-6ubuntu0.22.04.1~esm1
ubuntu/node-tar-fs(Ubuntu:Pro:22.04) = 2.1.1-2 No fix listed
ubuntu/node-tar-fs(Ubuntu:Pro:22.04) = 2.1.1-4 No fix listed
ubuntu/node-tar-fs(Ubuntu:Pro:22.04) = 2.1.1-6 No fix listed
ubuntu/node-tar-fs(Ubuntu:Pro:24.04) < 2.1.1-6ubuntu0.24.04.1~esm1 2.1.1-6ubuntu0.24.04.1~esm1
ubuntu/node-tar-fs(Ubuntu:Pro:24.04) = 2.1.1-6 No fix listed

References