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 CVE record has been updated after NVD enrichment efforts were completed. Enrichment data supplied by the NVD may require amendment due to these changes.
Description
The npm package "tar" (aka node-tar) before versions 4.4.16, 5.0.8, and 6.1.7 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories are created. This logic was insufficient when extracting tar files that contained both a directory and a symlink with the same name as the directory, where the symlink and directory names in the archive entry used backslashes as a path separator on posix systems. The cache checking logic used both `\` and `/` characters as path separators, however `\` is a valid filename character on posix systems. By first creating a directory, and then replacing that directory with a symlink, it was thus possible to bypass node-tar symlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite. Additionally, a similar confusion could arise on case-insensitive filesystems. If a tar archive contained a directory at `FOO`, followed by a symbolic link named `foo`, then on case-insensitive file systems, the creation of the symbolic link would remove the directory from the filesystem, but _not_ from the internal directory cache, as it would not be treated as a cache hit. A subsequent file entry within the `FOO` directory would then be placed in the target of the symbolic link, thinking that the directory had already been created. These issues were addressed in releases 4.4.16, 5.0.8 and 6.1.7. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you update to a more recent version of node-tar. If this is not possible, a workaround is available in the referenced GHSA-9r2w-394v-53qc.
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:npmjs:tar:*:*:*:*:*:node.js:*:* versions up to (excluding) 4.4.17
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions from (including) 5.0.0 up to (excluding) 5.0.9
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions from (including) 6.0.0 up to (excluding) 6.1.8
OR
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions up to (excluding) 4.4.16
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions from (including) 5.0.0 up to (excluding) 5.0.8
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions from (including) 6.0.0 up to (excluding) 6.1.7
Added
CPE Configuration
OR
*cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* versions up to (excluding) 1.0.1.1
Changed
Reference Type
https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf No Types Assigned
https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf Patch, Third Party Advisory
OR
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions up to (excluding) 4.4.17
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions from (including) 5.0.0 up to (excluding) 5.0.9
*cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* versions from (including) 6.0.0 up to (excluding) 6.1.8
Changed
Reference Type
https://github.com/npm/node-tar/security/advisories/GHSA-9r2w-394v-53qc No Types Assigned
https://github.com/npm/node-tar/security/advisories/GHSA-9r2w-394v-53qc Patch, 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 4.4.16, 5.0.8, and 6.1.7 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories a
The npm package "tar" (aka node-tar) before versions 4.4.16, 5.0.8, and 6.1.7 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories a
Quick Info
CVE Dictionary Entry: CVE-2021-37701 NVD
Published Date: 08/31/2021 NVD
Last Modified: 11/21/2024
Source: GitHub, Inc.