cve.bz

CVE-2021-37713 Path traversal

8.6 highEPSS 1.3%Fix available

High (8.6). EPSS 1.3% estimated probability of exploitation activity in the next 30 days. Fixed in tar 4.4.18, 5.0.10, 6.1.9.

On this page
The 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.

Severity

CVSS 3.1

8.6 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
EPSS
1.3% (unchanged from 1.3% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 71st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-37713 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-37713?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-37713?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-37713 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
npmjs:tarbefore 4.4.18
npmjs:tarfrom 5.0.0 before 5.0.10
npmjs:tarfrom 6.0.0 before 6.1.9
oracle:graalvm20.3.3
oracle:graalvm21.2.0
siemens:sinec_infrastructure_network_servicesbefore 1.0.1.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-5955-9wpr-37jhnpmtar<4.4.184.4.18
GHSA-5955-9wpr-37jhnpmtar>=5.0.0 <5.0.105.0.10
GHSA-5955-9wpr-37jhnpmtar>=6.0.0 <6.1.96.1.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSELinux Enterprise Module for Web and Scripting 12nodejs1212.22.9-1.38.1SUSE-SU-2022:0101-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1414.18.1-6.18.2SUSE-SU-2021:3886-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2, Linux Enterprise Module for Web and Scripting 15 SP3nodejs1212.22.7-4.22.1SUSE-SU-2021:3940-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2, Linux Enterprise Module for Web and Scripting 15 SP3nodejs1414.18.1-15.21.2SUSE-SU-2021:3964-1
openSUSELeap 15.2nodejs1212.22.7-lp152.3.21.1openSUSE-SU-2021:1574-1
openSUSELeap 15.2nodejs1414.18.1-lp152.17.1openSUSE-SU-2021:1552-1
openSUSELeap 15.3nodejs1212.22.7-4.22.1openSUSE-SU-2021:3940-1
openSUSELeap 15.3nodejs1414.18.1-15.21.2openSUSE-SU-2021:3964-1
openSUSETumbleweednodejs1414.18.1-1.1openSUSE-SU-2024:11616-1
Alpinev3.11, v3.12nodejs12.22.6-r0ALPINE-CVE-2021-37713
Alpinev3.13, v3.14, v3.15 and 9 morenodejs14.17.6-r0ALPINE-CVE-2021-37713

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE · openSUSE · Alpine.

Red Hat

ProductPackageStateAdvisory
Red Hat OpenShift Container Platform 4openshift4/ose-grafanaNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-37713.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-22-069-09Siemens SINEC INS2022-03-08MultipleSINEC INSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON