Read the docs
TI-2021-12468 Aliases CVE-2021-32803GHSA-r628-mhmh-qjhw

Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning

Priority MEDIUM 46CWE-22Published · Updated

Key facts

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

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

Summary

The npm package "tar" (aka node-tar) before versions 6.1.2, 5.0.7, 4.4.15, and 3.2.3 has an arbitrary File Creation/Overwrite vulnerability via insufficient symlink protection. `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. This order of operations resulted in the directory being created and added to the `node-tar` directory cache. When a directory is present in the directory cache, subsequent calls to mkdir for that directory are skipped. However, this is also where `node-tar` checks for symlinks occur. 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. This issue was addressed in releases 3.2.3, 4.4.15, 5.0.7 and 6.1.2.

Why it matters now

EPSS 0.07795 94th percentileScored 2026-11-07
Fix Partial node-tar (npm): 3.2.3, 4.4.15, 5.0.7 +1tar (npm): 3.2.3, 4.4.15, 5.0.7 +1Red Hat: 8 advisoriesRed Hat: 7 fixed, 5 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 3.2.3; 4.0.0 to before 4.4.15; 5.0.0 to before 5.0.7; 6.0.0 to before 6.1.23.2.3, 4.4.15, 5.0.7, 6.1.2Patch availableCNA
—tar (npm)3.0.0 to before 3.2.33.2.3Patch availableGHSA-r628-mhmh-qjhw
—tar (npm)4.0.0 to before 4.4.154.4.15Patch availableGHSA-r628-mhmh-qjhw
—tar (npm)5.0.0 to before 5.0.75.0.7Patch availableGHSA-r628-mhmh-qjhw
—tar (npm)6.0.0 to before 6.1.26.1.2Patch availableGHSA-r628-mhmh-qjhw
  • node-tar Vendornpm Affected before 3.2.3; 4.0.0 to before 4.4.15; 5.0.0 to before 5.0.7; 6.0.0 to before 6.1.2 Fixed in 3.2.3, 4.4.15, 5.0.7, 6.1.2 Patch available CNA
  • tar (npm) Vendor— Affected 3.0.0 to before 3.2.3 Fixed in 3.2.3 Patch available GHSA-r628-mhmh-qjhw
  • tar (npm) Vendor— Affected 4.0.0 to before 4.4.15 Fixed in 4.4.15 Patch available GHSA-r628-mhmh-qjhw
  • tar (npm) Vendor— Affected 5.0.0 to before 5.0.7 Fixed in 5.0.7 Patch available GHSA-r628-mhmh-qjhw
  • tar (npm) Vendor— Affected 6.0.0 to before 6.1.2 Fixed in 6.1.2 Patch available GHSA-r628-mhmh-qjhw

CPE configurations NVD · 4

CPEVersionsRoleVendor
cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:*before 3.2.3; 4.0.0 to before 4.4.15; 5.0.0 to before 5.0.7; 6.0.0 to before 6.1.2VulnerableTar Project
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:tar_project:tar:*:*:*:*:*:node.js:*:* Versions before 3.2.3; 4.0.0 to before 4.4.15; 5.0.0 to before 5.0.7; 6.0.0 to before 6.1.2 Vulnerable ·Tar Project
  • 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 3.2.3, 4.4.15, 5.0.7, 6.1.2
  • Fix · GHSA-r628-mhmh-qjhw tar (npm) Fixed in 3.2.3 Advisory →
  • Fix · GHSA-r628-mhmh-qjhw tar (npm) Fixed in 4.4.15 Advisory →
  • Fix · GHSA-r628-mhmh-qjhw tar (npm) Fixed in 5.0.7 Advisory →
  • Fix · GHSA-r628-mhmh-qjhw tar (npm) Fixed in 6.1.2 Advisory →

Red Hat 8 advisories

  • 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
  • RHSA-2021:4618 Released 2021-11-11 · Red Hat rating Important
    Red Hat Advanced Cluster Management 2.4 images and security updates
    • Red Hat Advanced Cluster Management for Kubernetes 2.4 for RHEL 8 rhacm2/acm-grafana-rhel8, rhacm2/acm-must-gather-rhel8, rhacm2/acm-operator-bundle +47
  • RHSA-2021:3666 Released 2021-09-27 · Red Hat rating Important
    nodejs:14 security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 8) nodejs-1:14.17.5-1.module+el8.4.0+12247+e2879e58.aarch64::nodejs:14, nodejs-1:14.17.5-1.module+el8.4.0+12247+e2879e58.ppc64le::nodejs:14, nodejs-1:14.17.5-1.module+el8.4.0+12247+e2879e58.s390x::nodejs:14 +19
Show 5 more Red Hat advisories
  • RHSA-2021:3638 Released 2021-09-22 · Red Hat rating Important
    nodejs:12 security and bug fix update
    • Red Hat Enterprise Linux AppStream EUS (v. 8.2) nodejs-1:12.22.5-1.module+el8.2.0+12241+a3db445b.aarch64::nodejs:12, nodejs-1:12.22.5-1.module+el8.2.0+12241+a3db445b.ppc64le::nodejs:12, nodejs-1:12.22.5-1.module+el8.2.0+12241+a3db445b.s390x::nodejs:12 +19
  • RHSA-2021:3639 Released 2021-09-22 · Red Hat rating Important
    nodejs:12 security and bug fix update
    • Red Hat Enterprise Linux AppStream EUS (v. 8.1) nodejs-1:12.22.5-1.module+el8.1.0+12238+63fe3aec.aarch64::nodejs:12, nodejs-1:12.22.5-1.module+el8.1.0+12238+63fe3aec.ppc64le::nodejs:12, nodejs-1:12.22.5-1.module+el8.1.0+12238+63fe3aec.s390x::nodejs:12 +19
  • RHSA-2021:3623 Released 2021-09-21 · Red Hat rating Important
    nodejs:12 security and bug fix update
    • Red Hat Enterprise Linux AppStream (v. 8) nodejs-1:12.22.5-1.module+el8.4.0+12242+af52a4c7.aarch64::nodejs:12, nodejs-1:12.22.5-1.module+el8.4.0+12242+af52a4c7.ppc64le::nodejs:12, nodejs-1:12.22.5-1.module+el8.4.0+12242+af52a4c7.s390x::nodejs:12 +19
  • RHSA-2021:3280 Released 2021-08-26 · Red Hat rating Important
    rh-nodejs14-nodejs and rh-nodejs14-nodejs-nodemon security update
    • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs14-nodejs-14.17.5-1.el7, rh-nodejs14-nodejs-devel-14.17.5-1.el7, rh-nodejs14-nodejs-docs-14.17.5-1.el7 +2
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs14-nodejs-14.17.5-1.el7, rh-nodejs14-nodejs-devel-14.17.5-1.el7, rh-nodejs14-nodejs-docs-14.17.5-1.el7 +2
    • Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs14-nodejs-14.17.5-1.el7, rh-nodejs14-nodejs-devel-14.17.5-1.el7, rh-nodejs14-nodejs-docs-14.17.5-1.el7 +2
  • RHSA-2021:3281 Released 2021-08-26 · Red Hat rating Important
    rh-nodejs12-nodejs and rh-nodejs12-nodejs-nodemon security update
    • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs12-nodejs-12.22.5-1.el7, rh-nodejs12-nodejs-devel-12.22.5-1.el7, rh-nodejs12-nodejs-docs-12.22.5-1.el7 +2
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs12-nodejs-12.22.5-1.el7, rh-nodejs12-nodejs-devel-12.22.5-1.el7, rh-nodejs12-nodejs-docs-12.22.5-1.el7 +2
    • Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs12-nodejs-12.22.5-1.el7, rh-nodejs12-nodejs-devel-12.22.5-1.el7, rh-nodejs12-nodejs-docs-12.22.5-1.el7 +2

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 Advanced Cluster Management for Kubernetes 2AffectedNo fix yet
Red Hat OpenShift Container Platform 4AffectedNo fix planned: Will not fix
Red Hat OpenShift GitOpsAffectedNo fix planned: Will not fix
Red Hat Openshift Container Storage 4AffectedNo fix yet
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2021:3623, RHSA-2021:3666
Red Hat Enterprise Linux AppStream EUS (v. 8.1)Fixed RHSA-2021:3639
Red Hat Enterprise Linux AppStream EUS (v. 8.2)Fixed RHSA-2021:3638
Red Hat OpenShift Data Foundation 4.9 on RHEL-8Fixed RHSA-2021:5086
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)Fixed RHSA-2021:3280, RHSA-2021:3281
Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7)Fixed RHSA-2021:3280, RHSA-2021:3281
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)Fixed RHSA-2021:3280, RHSA-2021:3281
Not affected: 9 products
  • Red Hat Advanced Cluster Management for Kubernetes 2
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat Fuse 7
  • Red Hat OpenShift distributed tracing 2
  • Red Hat Quay 3
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)
  • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7)
  • Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-32803
  2. 2026-10-03 Alias added: GHSA-r628-mhmh-qjhw

References

Sources