CVE-2021-32804
Scores
EPSS
Percentile: 85.0%
CVSS
CVSS Score: 8.1/10
All CVSS Scores
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Vector Breakdown
CVSS (Common Vulnerability Scoring System) vector provides detailed metrics about vulnerability characteristics
CVSS
Attack Vector
Network (N)
Describes how the vulnerability is exploited
Attack Complexity
Low (L)
Describes the conditions beyond the attacker's control
Privileges Required
None (N)
Describes the level of privileges an attacker must possess
User Interaction
Required (R)
Captures the requirement for a human user participation
Scope
Unchanged (U)
Determines if a successful attack impacts components beyond the vulnerable component
Confidentiality Impact
None (N)
Measures the impact to the confidentiality of information
Integrity Impact
High (H)
Measures the impact to integrity of a successfully exploited vulnerability
Availability Impact
High (H)
Measures the impact to the availability of the impacted component
Vector: AV:N/AC:M/Au:N/C:N/I:P/A:P
Vector Breakdown
CVSS (Common Vulnerability Scoring System) vector provides detailed metrics about vulnerability characteristics
CVSS
Attack Vector
Network (N)
Describes how the vulnerability is exploited
Attack Complexity
Medium
Describes the conditions beyond the attacker's control
Authentication
None (N)
Describes the level of privileges an attacker must possess
Confidentiality Impact
None (N)
Measures the impact to the confidentiality of information
Integrity Impact
Partial
Measures the impact to integrity of a successfully exploited vulnerability
Availability Impact
Partial
Measures the impact to the availability of the impacted component
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 home/user/.bashrc. This logic was insufficient when file paths contained repeated path roots such as ////home/user/.bashrc. node-tar would only strip a single path root from such paths. When given an absolute file path with repeating path roots, the resulting path (e.g. ///home/user/.bashrc) would still resolve to an absolute path, thus allowing arbitrary file creation and overwrite. This issue was addressed in releases 3.2.2, 4.4.14, 5.0.6 and 6.1.1. Users may work around this vulnerability without upgrading by creating a custom onentry method which sanitizes the entry.path or a filter method which removes entries with absolute paths. See referenced GitHub Advisory for details. Be aware of CVE-2021-32803 which fixes a similar bug in later versions of tar.
Scaner-VS 7 — a modern vulnerability management solution
Sources
CWEs
Related Vulnerabilities
Exploits
Vulnerable Software (28)
Type: Configuration
Product: node-tar
Operating System: ubuntu bionic 18.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu focal 20.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu hirsute 21.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu impish 21.10
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu kinetic 22.10
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu lunar 23.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu mantic 23.10
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu oracular 24.10
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu plucky 25.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu trusty 14.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: ubuntu xenial 16.04
{ "unfixed": true}
Source: ubuntu
Type: Configuration
Product: node-tar
Operating System: debian
{ "fixed": "6.1.7+~cs11.3.10-1"}
Source: debian
Type: Configuration
Product: node-tar
Operating System: debian bullseye 11
{ "fixed": "6.0.5+ds1+~cs11.3.9-1+deb11u1"}
Source: debian
Type: Configuration
Product: node-tar
Operating System: debian buster 10
{ "fixed": "4.4.6+ds1-3+deb10u1"}
Source: debian
Type: Configuration
Product: node-tar
Operating System: debian stretch 9
{ "unaffected": true}
Source: debian
Type: Configuration
Product: nodejs
Operating System: rhel
{ "fixed": "12-8040020210817133458.522a0ee4"}
Source: redhat
Type: Configuration
Product: nodejs
Operating System: rhel
{ "fixed": "14-8040020210817165654.522a0ee4"}
Source: redhat
Type: Configuration
Product: nodejs
Operating System: rhel
{ "fixed": "12-8010020210817113128.c27ad7f8"}
Source: redhat
Type: Configuration
Product: nodejs
Operating System: rhel
{ "fixed": "12-8020020210817125332.4cda2c84"}
Source: redhat
Type: Configuration
Product: rh-nodejs12-nodejs
Operating System: rhel
{ "fixed": "12.22.5-1.el7"}
Source: redhat