You are viewing this page in an unauthorized frame window.
This is a potential security issue, you are being redirected to
https://nvd.nist.gov
An official website of the United States government
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
Secure .gov websites use HTTPS
A lock () or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.
This vulnerability has been modified since it was last analyzed by the NVD. It is awaiting reanalysis which may result in further changes to the information provided.
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.
Metrics
NVD enrichment efforts reference publicly available information to associate
vector strings. CVSS information contributed by other sources is also
displayed.
By selecting these links, you will be leaving NIST webspace.
We have provided these links to other web sites because they
may have information that would be of interest to you. No
inferences should be drawn on account of other sites being
referenced, or not, from this page. There may be other web
sites that are more appropriate for your purpose. NIST does
not necessarily endorse the views expressed, or concur with
the facts presented on these sites. Further, NIST does not
endorse any commercial products that may be mentioned on
these sites. Please address comments about this page to nvd@nist.gov.
OR
*cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* versions up to (excluding) 3.2.2
*cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* versions from (including) 4.0.0 up to (excluding) 4.4.14
*cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* versions from (including) 5.0.0 up to (excluding) 5.0.6
*cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* versions from (including) 6.0.0 up to (excluding) 6.1.1
Changed
Reference Type
https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4 No Types Assigned
https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4 Patch, Third Party Advisory
Changed
Reference Type
https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9 No Types Assigned
https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9 Mitigation, Third Party Advisory
Changed
Reference Type
https://www.npmjs.com/advisories/1770 No Types Assigned
https://www.npmjs.com/advisories/1770 Mitigation, Third Party Advisory
Changed
Reference Type
https://www.npmjs.com/package/tar No Types Assigned
https://www.npmjs.com/package/tar Product, Third Party Advisory
Added
CVSS V2 Metadata
Victim must voluntarily interact with attack mechanism
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
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
Quick Info
CVE Dictionary Entry: CVE-2021-32804 NVD
Published Date: 08/03/2021 NVD
Last Modified: 11/21/2024
Source: GitHub, Inc.