CVE-2021-32804Path Traversal in Node-tar

CWE-22Path Traversal7 documents6 sources
Severity
8.1HIGHNVD
CNA8.2
EPSS
85.0%
top 0.65%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedAug 3

Description

The npm package "tar" (aka node-tar) before versions 6.1.1, 5.0.6, 4.4.14, and 3.3.2 has a arbitrary File Creation/Overwrite vulnerability due to insufficient absolute path sanitization. node-tar aims to prevent extraction of absolute file paths by turning absolute paths into relative paths when the `preservePaths` flag is not set to `true`. This is achieved by stripping the absolute path root from any absolute file paths contained in a tar file. For example `/home/user/.bashrc` would turn into

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:HExploitability: 2.8 | Impact: 5.2

Affected Packages6 packages

CVEListV5npm/node-tar< 3.2.2+3
Debianisaacs/node-tar< 6.0.5+ds1+~cs11.3.9-1+deb11u1+3
npmgnu/tar4.0.04.4.14+3
NVDtar_project/tar4.0.04.4.14+3

Patches

🔴Vulnerability Details

4
GHSA
Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization2021-08-03
OSV
Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization2021-08-03
CVEList
Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization2021-08-03
OSV
CVE-2021-32804: The npm package "tar" (aka node-tar) before versions 62021-08-03

📋Vendor Advisories

2
Red Hat
nodejs-tar: Insufficient absolute path sanitization allowing arbitrary file creation and overwrite2021-08-03
Debian
CVE-2021-32804: node-tar - The npm package "tar" (aka node-tar) before versions 6.1.1, 5.0.6, 4.4.14, and 3...2021
CVE-2021-32804 — Path Traversal in NPM Node-tar | cvebase