CVE-2021-37713

Summary

CVECVE-2021-37713
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2021-08-31 17:15:00 UTC
Updated2022-04-25 18:40:00 UTC
DescriptionThe npm package "tar" (aka node-tar) before versions 4.4.18, 5.0.10, and 6.1.9 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain `..` path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as `C:some\path`. If the drive letter does not match the extraction target, for example `D:\extraction\dir`, then the result of `path.resolve(extractionDirectory, entryPath)` would resolve against the current working directory on the `C:` drive, rather than the extraction target directory. Additionally, a `..` portion of the path could occur immediately after the drive letter, such as `C:../foo`, and was not properly sanitized by the logic that checked for `..` within the normalized and split portions of the path. This only affects users of `node-tar` on Windows systems. These issues were addressed in releases 4.4.18, 5.0.10 and 6.1.9. 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. There is no reasonable way to work around this issue without performing the same path normalization procedures that node-tar now does. Users are encouraged to upgrade to the latest patched versions of node-tar, rather than attempt to sanitize paths themselves.

Risk And Classification

Problem Types: CWE-22

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Microsoft Windows - All All All
Application Npmjs Tar All All All All
Application Npmjs Tar All All All All
Application Npmjs Tar All All All All
Application Npmjs Tar All All All All
Application Oracle Graalvm 20.3.3 All All All
Application Oracle Graalvm 21.2.0 All All All
Application Siemens Sinec Infrastructure Network Services All All All All

References

ReferenceSourceLinkTags
Oracle Critical Patch Update Advisory - October 2021 MISC www.oracle.com
Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization · Advisory · npm/node-tar · GitHub CONFIRM github.com
cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf CONFIRM cert-portal.siemens.com
tar - npm MISC www.npmjs.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 296065 Oracle Solaris 11.4 Support Repository Update (SRU) 39.107.1 Missing (CPUOCT2021)
  • 375828 Node.js Multiple Vulnerabilities (August 2021)
  • 500445 Alpine Linux Security Update for nodejs
  • 501454 Alpine Linux Security Update for nodejs
  • 504208 Alpine Linux Security Update for nodejs
  • 690030 Free Berkeley Software Distribution (FreeBSD) Security Update for node.js (7062bce0-1b17-11ec-9d9d-0022489ad614)
  • 751457 OpenSUSE Security Update for nodejs12 (openSUSE-SU-2021:3940-1)
  • 751475 OpenSUSE Security Update for nodejs14 (openSUSE-SU-2021:3964-1)
  • 751509 OpenSUSE Security Update for nodejs12 (openSUSE-SU-2021:1574-1)
  • 751518 OpenSUSE Security Update for nodejs14 (openSUSE-SU-2021:1552-1)
  • 980369 Nodejs (npm) Security Update for tar (GHSA-5955-9wpr-37jh)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report