Read the docs
TI-2021-15587 Aliases CVE-2021-37712GHSA-qq89-hq3f-393p

Path traversal in npm node-tar

Priority MEDIUM 41CWE-22Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 7 fixed, 6 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.

Summary

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 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 names containing unicode values that normalized to the same value. Additionally, on Windows systems, long path portions would resolve to the same file system entities as their 8.3 "short path" counterparts. A specially crafted tar archive could thus include a directory with one form of the path, followed by a symbolic link with a different string that resolves to the same file system entity, followed by a file using the first form. By first creating a directory, and then replacing that directory with a symlink that had a different apparent name that resolved to the same entry in the filesystem, 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. 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. If this is not possible, a workaround is available in the referenced GHSA-qq89-hq3f-393p.

Why it matters now

EPSS 0.01865 79th percentileScored 2026-11-07
Fix Partial node-tar (npm): 4.4.18, 5.0.10, 6.1.9tar (npm): 4.4.18, 5.0.10, 6.1.9Red Hat: 5 advisoriesRed Hat: 7 fixed, 6 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
npmnode-tarbefore 4.4.18; 5.0.0 to before 5.0.10; 6.0.0 to before 6.1.94.4.18, 5.0.10, 6.1.9Patch availableCNA
—tar (npm)3.0.0 to before 4.4.184.4.18Patch availableGHSA-qq89-hq3f-393p
—tar (npm)5.0.0 to before 5.0.105.0.10Patch availableGHSA-qq89-hq3f-393p
—tar (npm)6.0.0 to before 6.1.96.1.9Patch availableGHSA-qq89-hq3f-393p
  • node-tar Vendornpm Affected before 4.4.18; 5.0.0 to before 5.0.10; 6.0.0 to before 6.1.9 Fixed in 4.4.18, 5.0.10, 6.1.9 Patch available CNA
  • tar (npm) Vendor— Affected 3.0.0 to before 4.4.18 Fixed in 4.4.18 Patch available GHSA-qq89-hq3f-393p
  • tar (npm) Vendor— Affected 5.0.0 to before 5.0.10 Fixed in 5.0.10 Patch available GHSA-qq89-hq3f-393p
  • tar (npm) Vendor— Affected 6.0.0 to before 6.1.9 Fixed in 6.1.9 Patch available GHSA-qq89-hq3f-393p

CPE configurations NVD · 7

CPEVersionsRoleVendor
cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:*up to 4.4.17; 5.0.0 – 5.0.9; 6.0.0 – 6.1.8VulnerableNpmjs
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*not specified by NVDRunning onMicrosoft
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*10.0VulnerableDebian
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*11.0VulnerableDebian
cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*20.3.3VulnerableOracle
cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*21.2.0VulnerableOracle
cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*before 1.0.1.1VulnerableSiemens
  • cpe:2.3:a:npmjs:tar:*:*:*:*:*:node.js:*:* Versions up to 4.4.17; 5.0.0 – 5.0.9; 6.0.0 – 6.1.8 Vulnerable ·Npmjs
  • cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:* Versions not specified by NVD Running on ·Microsoft
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
  • cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
  • cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:* Versions 20.3.3 Vulnerable ·Oracle
  • cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:* Versions 21.2.0 Vulnerable ·Oracle
  • cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* Versions before 1.0.1.1 Vulnerable ·Siemens

Remediation

  • Fix · CNA node-tar (npm) Fixed in 4.4.18, 5.0.10, 6.1.9
  • Fix · GHSA-qq89-hq3f-393p tar (npm) Fixed in 4.4.18 Advisory →
  • Fix · GHSA-qq89-hq3f-393p tar (npm) Fixed in 5.0.10 Advisory →
  • Fix · GHSA-qq89-hq3f-393p tar (npm) Fixed in 6.1.9 Advisory →

Red Hat 5 advisories

  • RHSA-2022:4914 Released 2022-06-06 · Red Hat rating Moderate
    rh-nodejs12-nodejs security, bug fix, and enhancement update
    • Red Hat Software Collections for RHEL Workstation(v. 7) rh-nodejs12-nodejs-12.22.12-2.el7, rh-nodejs12-nodejs-devel-12.22.12-2.el7, rh-nodejs12-nodejs-docs-12.22.12-2.el7 +1
    • Red Hat Software Collections for RHEL(v. 7) rh-nodejs12-nodejs-12.22.12-2.el7, rh-nodejs12-nodejs-devel-12.22.12-2.el7, rh-nodejs12-nodejs-docs-12.22.12-2.el7 +1
  • RHSA-2022:0350 Released 2022-02-01 · Red Hat rating Moderate
    nodejs:14 security, bug fix, and enhancement update
    • Red Hat Enterprise Linux AppStream (v. 8) nodejs-1:14.18.2-2.module+el8.5.0+13644+8d46dafd.aarch64::nodejs:14, nodejs-1:14.18.2-2.module+el8.5.0+13644+8d46dafd.ppc64le::nodejs:14, nodejs-1:14.18.2-2.module+el8.5.0+13644+8d46dafd.s390x::nodejs:14 +19
  • RHSA-2022:0246 Released 2022-01-25 · Red Hat rating Moderate
    nodejs:14 security, bug fix, and enhancement update
    • Red Hat Enterprise Linux AppStream EUS (v.8.4) nodejs-1:14.18.2-2.module+el8.4.0+13643+6c0ebf22.aarch64::nodejs:14, nodejs-1:14.18.2-2.module+el8.4.0+13643+6c0ebf22.ppc64le::nodejs:14, nodejs-1:14.18.2-2.module+el8.4.0+13643+6c0ebf22.s390x::nodejs:14 +19
Show 2 more Red Hat advisories
  • RHSA-2022:0041 Released 2022-01-06 · Red Hat rating Moderate
    rh-nodejs14-nodejs and rh-nodejs14-nodejs-nodemon security update
    • Red Hat Software Collections for RHEL Workstation(v. 7) rh-nodejs14-nodejs-14.18.2-1.el7, rh-nodejs14-nodejs-devel-14.18.2-1.el7, rh-nodejs14-nodejs-docs-14.18.2-1.el7 +2
    • Red Hat Software Collections for RHEL(v. 7) rh-nodejs14-nodejs-14.18.2-1.el7, rh-nodejs14-nodejs-devel-14.18.2-1.el7, rh-nodejs14-nodejs-docs-14.18.2-1.el7 +2
  • RHSA-2021:5086 Released 2021-12-13 · Red Hat rating Moderate
    Red Hat OpenShift Data Foundation 4.9.0 enhancement, security, and bug fix update
    • Red Hat OpenShift Data Foundation 4.9 on RHEL-8 odf/odf-multicluster-rhel8-operator, odf4/cephcsi-rhel8, odf4/ocs-must-gather-rhel8 +12

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Advisory ·

    npm node-tar — DSA-5008

    2 records Highest priority Priority MEDIUM 2 MEDIUM

    Other records, highest priority first

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
OpenShift Service Mesh 2.0AffectedNo fix yet
Red Hat 3scale API Management Platform 2AffectedNo fix yet: Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2AffectedNo fix yet
Red Hat OpenShift Container Platform 4AffectedNo fix planned: Will not fix
Red Hat OpenShift GitOpsAffectedNo fix yet
Red Hat Openshift Container Storage 4AffectedNo fix yet
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2022:0350
Red Hat Enterprise Linux AppStream E4S (v. 8.1)Fixed—
Red Hat Enterprise Linux AppStream EUS (v. 8.2)Fixed—
Red Hat Enterprise Linux AppStream EUS (v.8.4)Fixed RHSA-2022:0246
Red Hat OpenShift Data Foundation 4.9 on RHEL-8Fixed RHSA-2021:5086
Red Hat Software Collections for RHEL Workstation(v. 7)Fixed RHSA-2022:0041, RHSA-2022:4914
Red Hat Software Collections for RHEL(v. 7)Fixed RHSA-2022:0041, RHSA-2022:4914
Not affected: 4 products
  • Red Hat Advanced Cluster Management for Kubernetes 2
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat Fuse 7

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-37712
  2. 2026-10-03 Alias added: GHSA-qq89-hq3f-393p

References

Sources