CVE-2021-32804

CVSS V2 Medium 5.8 CVSS V3 High 8.1
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.
Overview
  • CVE ID
  • CVE-2021-32804
  • Assigner
  • security-advisories@github.com
  • Vulnerability Status
  • Analyzed
  • Published Version
  • 2021-08-03T19:15:08
  • Last Modified Date
  • 2022-04-25T19:12:42
CPE Configuration (Product)
CPE Vulnerable Operator Version Start Version End
cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* 1 OR 3.2.2
cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* 1 OR 4.0.0 4.4.14
cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* 1 OR 5.0.0 5.0.6
cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* 1 OR 6.0.0 6.1.1
cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:* 1 OR
cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:* 1 OR
cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* 1 OR 1.0.1.1
CVSS Version 2
  • Version
  • 2.0
  • Vector String
  • AV:N/AC:M/Au:N/C:N/I:P/A:P
  • Access Vector
  • NETWORK
  • Access Compatibility
  • MEDIUM
  • Authentication
  • NONE
  • Confidentiality Impact
  • NONE
  • Integrity Impact
  • PARTIAL
  • Availability Impact
  • PARTIAL
  • Base Score
  • 5.8
  • Severity
  • MEDIUM
  • Exploitability Score
  • 8.6
  • Impact Score
  • 4.9
CVSS Version 3
  • Version
  • 3.1
  • Vector String
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
  • Attack Vector
  • NETWORK
  • Attack Compatibility
  • LOW
  • Privileges Required
  • NONE
  • User Interaction
  • REQUIRED
  • Scope
  • UNCHANGED
  • Confidentiality Impact
  • NONE
  • Availability Impact
  • HIGH
  • Base Score
  • 8.1
  • Base Severity
  • HIGH
  • Exploitability Score
  • 2.8
  • Impact Score
  • 5.2
History
Created Old Value New Value Data Type Notes
2022-05-10 06:26:44 Added to TrackCVE
2022-12-05 07:17:53 2021-08-03T19:15Z 2021-08-03T19:15:08 CVE Published Date updated
2022-12-05 07:17:53 2022-04-25T19:12:42 CVE Modified Date updated
2022-12-05 07:17:53 Analyzed Vulnerability Status updated