CVE-2021-32803 json
Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning
published 2021-08-03 5 y ago modified 2026-07-08 4 mo ago also GHSA-r628-mhmh-qjhw , EUVD-2021-1856
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 7.8%
- EPSS 7.8% chance of exploitation in 30 days, percentile 94%
- public exploits
- 0
- none known
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.
Patch / fix
- npm tar 3.2.3, 4.4.15, 5.0.7, 6.1.2
- tar_project tar 3.2.3, 4.4.15, 5.0.7, 6.1.2
- siemens sinec_infrastructure_network_services 1.0.1.1
- node-tar Debian 14, Debian 13, Debian 12 6.1.7+~cs11.3.10-1
debian advisories DEBIAN-CVE-2021-32803
- node-tar Ubuntu Pro 20.04 LTS 4.4.10+ds1-2ubuntu1+esm1
ubuntu advisories UBUNTU-CVE-2021-32803
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- npm RHEL 8 1:6.14.14-1.14.17.5.1.module+el8.4.0+12247+e2879e58
- nodejs RHEL 8 1:14.17.5-1.module+el8.4.0+12247+e2879e58
- nodejs-nodemon RHEL 8 2.0.3-1.module+el8.3.0+6519+9f98ed83
- nodejs-full-i18n RHEL 8 1:14.17.5-1.module+el8.4.0+12247+e2879e58
- nodejs-packaging RHEL 8 23-3.module+el8.3.0+6519+9f98ed83
- nodejs-packaging RHEL 8, RHEL 8.2 EUS, RHEL 8.1 EUS 17-3.module+el8.1.0+3369+37ae6a45
- npm RHEL 8 1:6.14.14-1.12.22.5.1.module+el8.4.0+12242+af52a4c7
- nodejs RHEL 8 1:12.22.5-1.module+el8.4.0+12242+af52a4c7
red hat advisories RHSA-2021:3666RHSA-2021:3639RHSA-2021:3638RHSA-2021:3623RHSA-2021:3280RHSA-2021:3281
- nodejs10 SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES for SAP 15 +18 more 10.24.1-150000.1.44.1
- nodejs14 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +7 more 14.19.0-15.27.1
- nodejs8 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +6 more 8.17.0-10.19.2
- nodejs-common SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES for SAP 15 +16 more 2.0-3.4.1
- nodejs12 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +7 more 12.22.10-4.29.3
- nodejs10 SLE Module for Web and Scripting 12 10.24.1-1.46.1
- nodejs14 SLE Module for Web and Scripting 12 14.19.0-6.24.1
- nodejs8 SLES for SAP 15 SP1, SLES for SAP 15, SLES 15-LTSS +7 more 8.17.0-3.54.2
suse advisories SUSE-SU-2022:1717-1SUSE-SU-2022:0715-1SUSE-SU-2022:0704-1SUSE-SU-2022:0657-1SUSE-SU-2022:0570-1SUSE-SU-2022:0569-1
- nodejs14 openSUSE Leap 15.3 14.19.0-15.27.1
- nodejs8 openSUSE Leap 15.3 8.17.0-10.19.2
- nodejs12 openSUSE Leap 15.3 12.22.10-4.29.3
opensuse advisories openSUSE-SU-2022:0715-1openSUSE-SU-2022:0704-1openSUSE-SU-2022:0657-1
- nodejs-nodemon AlmaLinux 8 2.0.3-1.module_el8.4.0+2521+c668cc9f
- nodejs-packaging AlmaLinux 8 23-3.module_el8.5.0+254+b4526b16
- nodejs-packaging AlmaLinux 8 23-3.module_el8.4.0+2522+3bd42762
- npm AlmaLinux 8 1:6.14.14-1.12.22.5.1.module_el8.4.0+2529+af52a4c7
- npm AlmaLinux 8 1:6.14.14-1.12.22.5.1.module_el8.5.0+85+79a7b441
- nodejs AlmaLinux 8 1:12.22.5-1.module_el8.4.0+2529+af52a4c7
- nodejs AlmaLinux 8 1:12.22.5-1.module_el8.5.0+85+79a7b441
- nodejs-full-i18n AlmaLinux 8 1:12.22.5-1.module_el8.5.0+85+79a7b441
almalinux advisories ALSA-2021:3666ALSA-2021:3623
- nodejs Rocky Linux 8 1:14.17.5-1.module+el8.4.0+654+17ff1d38
- nodejs-nodemon Rocky Linux 8 2.0.3-1.module+el8.6.0+982+9fdca2d4
- nodejs-nodemon Rocky Linux 8 2.0.3-1.module+el8.3.0+100+234774f7
- nodejs-nodemon Rocky Linux 8 2.0.3-1.module+el8.4.0+638+5344c6f7
- nodejs-packaging Rocky Linux 8 23-3.module+el8.7.0+1071+4bdda2a8
- nodejs-packaging Rocky Linux 8 23-3.module+el8.3.0+100+234774f7
- nodejs-packaging Rocky Linux 8 23-3.module+el8.5.0+733+de4fee6c
- nodejs Rocky Linux 8 1:12.22.5-1.module+el8.4.0+647+e905fa21
rocky linux advisories RLSA-2021:3666RLSA-2021:3623
- github.com/npm/node-tar@9dbdeb6 commit
- github.com/isaacs/node-tar@46fe350 commit
- github.com/isaacs/node-tar@5987d9a commit
- github.com/isaacs/node-tar@85d3a94 commit
- github.com/isaacs/node-tar@9dbdeb6 commit
- oracle.com/security-alerts/cpuoct2021.html advisory
- cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-32803 updated cvss 8.1
nodejs-tar: Insufficient symlink protection allowing arbitrary file creation and overwrite
-
Red Hat OpenShift Service Mesh 2.0 servicemesh-grafana, servicemesh-grafana-prometheusaffected: no fix available
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/grc-ui-rhel8, rhacm2/console-rhel8, rhacm2/search-ui-rhel8, rhacm2/console-ui-rhel8, rhacm2/mcm-topology-rhel8, rhacm2/console-header-rhel8, +1 moreaffected: no fix available “Fix deferred”
-
Red Hat OpenShift Container Platform 4 openshift4/ose-grafanaaffected: no fix planned “Will not fix”
-
Red Hat Openshift Container Storage 4 ocs4/mcg-core-rhel8affected: no fix available
-
Red Hat OpenShift GitOps openshift-gitops-1/argocd-rhel8affected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux AppStream (v. 8) nodejs 12.22.5-1.module+el8.4.0+12242+af52a4c7, nodejs 14.17.5-1.module+el8.4.0+12247+e2879e58, nodejs-packaging 17-3.module+el8.1.0+3369+37ae6a45, nodejs-packaging 23-3.module+el8.3.0+6519+9f98ed83, nodejs-nodemon 2.0.3-1.module+el8.3.0+6519+9f98ed83, nodejs-nodemon 2.0.3-1.module+el8.4.0+11732+c668cc9f, +4 morefixed: vendor fix RHSA-2021:3623
-
Red Hat Enterprise Linux AppStream EUS (v. 8.1) nodejs 12.22.5-1.module+el8.1.0+12238+63fe3aec, nodejs-packaging 17-3.module+el8.1.0+3369+37ae6a45, nodejs-nodemon 1.18.3-1.module+el8.1.0+3369+37ae6a45, npm 6.14.14-1.12.22.5.1.module+el8.1.0+12238+63fe3aec, nodejs-full-i18n 12.22.5-1.module+el8.1.0+12238+63fe3aecfixed: vendor fix RHSA-2021:3639
-
Red Hat Enterprise Linux AppStream EUS (v. 8.2) nodejs 12.22.5-1.module+el8.2.0+12241+a3db445b, nodejs-packaging 17-3.module+el8.1.0+3369+37ae6a45, nodejs-nodemon 1.18.3-1.module+el8.1.0+3369+37ae6a45, npm 6.14.14-1.12.22.5.1.module+el8.2.0+12241+a3db445b, nodejs-full-i18n 12.22.5-1.module+el8.2.0+12241+a3db445bfixed: vendor fix RHSA-2021:3638
show 3 moreshow fewer
-
Red Hat OpenShift Data Foundation 4.9 on RHEL-8 odf4/ocs-operator-bundle 4.9.0-5, odf4/odf-operator-bundle 4.9.0-5, odf4/odr-hub-operator-bundle 4.9.0-5, odf4/odr-cluster-operator-bundle 4.9.0-5, odf4/odf-multicluster-operator-bundle 4.9.0-5, odf4/cephcsi-rhel8 4.9-164.57484e3.release_4.9, +9 morefixed: vendor fix RHSA-2021:5086
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs12-nodejs 12.22.5-1.el7, rh-nodejs14-nodejs 14.17.5-1.el7, rh-nodejs12-npm 6.14.14-12.22.5.1.el7, rh-nodejs14-npm 6.14.14-14.17.5.1.el7, rh-nodejs12-nodejs-nodemon 2.0.3-5.el7 Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs12-nodejs 12.22.5-1.el7, rh-nodejs14-nodejs 14.17.5-1.el7, rh-nodejs12-npm 6.14.14-12.22.5.1.el7, rh-nodejs14-npm 6.14.14-14.17.5.1.el7, rh-nodejs12-nodejs-nodemon 2.0.3-5.el7 Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs12-nodejs 12.22.5-1.el7, rh-nodejs14-nodejs 14.17.5-1.el7, rh-nodejs12-npm 6.14.14-12.22.5.1.el7, rh-nodejs14-npm 6.14.14-14.17.5.1.el7, rh-nodejs12-nodejs-nodemon 2.0.3-5.el7fixed: vendor fix RHSA-2021:3281
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/application-ui-rhel8 Red Hat Enterprise Linux 8 npm, nodejs, nodejs-libs, nodejs-nodemon, nodejs-full-i18n, nodejs-packaging, +1 more Red Hat Enterprise Linux 9 npm, nodejs, nodejs-libs, nodejs-full-i18n Red Hat Fuse 7 tar-pack Red Hat OpenShift distributed tracing 2 rhosdt/jaeger-all-in-one-rhel8 Red Hat Quay 3 quaynot affected: vulnerable code not present
+3 more productsfewer
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs14-nodejs-nodemon 2.0.3-5.el7 Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs14-nodejs-nodemon 2.0.3-5.el7 Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs14-nodejs-nodemon 2.0.3-5.el7
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-22-069-09 updated cvss 8.1
Siemens SINEC INS
-
Siemens SINEC INS <V1.0.1.1affected: fixed in V1.0.1.1 support.industry.siemens.com
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
7.80% chance of exploitation in the next 30 days, higher than 94% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| NVD | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H |
| NVD | 2.0 | 5.8 | AV:N/AC:M/Au:N/C:N/I:P/A:P |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | tar | >=3.0.0, <3.2.3 >=4.0.0, <4.4.15 >=5.0.0, <5.0.7 >=6.0.0, <6.1.2 |
3.2.3 4.4.15 5.0.7 6.1.2 |
Affected products
- npm node-tar
Classification
References
-
github.com
/npm/node-tar/commit/9dbdeb6df8e9dbd96fa9e84341b9d74734be6c20
web, patch, third-party-advisory
-
oracle.com
/security-alerts/cpuoct2021.html
web, patch, third-party-advisory
-
cert-portal.siemens.com
/productcert/pdf/ssa-389290.pdf
web, patch, third-party-advisory
-
github.com
/isaacs/node-tar/commit/46fe35083e2676e31c4e0a81639dce6da7aaa356
web
-
github.com
/isaacs/node-tar/commit/5987d9a41f6bfbf1ddab1098e1fdcf1a5618f571
web
-
github.com
/isaacs/node-tar/commit/85d3a942b4064e4ff171f91696fced7975167349
web
-
github.com
/isaacs/node-tar/commit/9dbdeb6df8e9dbd96fa9e84341b9d74734be6c20
web
-
github.com
/npm/node-tar/security/advisories/GHSA-r628-mhmh-qjhw
web, mitigation, third-party-advisory
-
npmjs.com
/advisories/1771
web, mitigation, third-party-advisory
-
npmjs.com
/package/tar
web, product, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-32803
advisory
-
github.com
/isaacs/node-tar
package
Sources
- CVE List CVE-2021-32803
- GitHub Advisory GHSA-r628-mhmh-qjhw
- NVD CVE-2021-32803
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.