CVE-2021-37712 json
Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links
published 2021-08-31 5 y ago modified 2026-07-08 4 mo ago also GHSA-qq89-hq3f-393p , EUVD-2021-1849
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.9%
- EPSS 1.9% chance of exploitation in 30 days, percentile 79%
- public exploits
- 0
- none known
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.
Patch / fix
- npm tar 4.4.18, 5.0.10, 6.1.9
- siemens sinec_infrastructure_network_services 1.0.1.1
- node-tar Debian 14, Debian 13, Debian 12 6.1.11+~cs11.3.10-1
debian advisories DEBIAN-CVE-2021-37712
- npm RHEL 8 1:6.14.15-1.14.18.2.2.module+el8.5.0+13644+8d46dafd
- nodejs RHEL 8 1:14.18.2-2.module+el8.5.0+13644+8d46dafd
- nodejs-nodemon RHEL 8 2.0.15-1.module+el8.5.0+13504+a2e74d91
- nodejs-full-i18n RHEL 8 1:14.18.2-2.module+el8.5.0+13644+8d46dafd
- nodejs-packaging RHEL 8, RHEL 8.4 EUS 23-3.module+el8.3.0+6519+9f98ed83
- npm RHEL 8 1:6.14.16-1.12.22.12.1.module+el8.6.0+15324+1f2c5d8d
- nodejs RHEL 8 1:12.22.12-1.module+el8.6.0+15324+1f2c5d8d
- nodejs-nodemon RHEL 8, RHEL 8.4 EUS 2.0.3-1.module+el8.4.0+11732+c668cc9f
red hat advisories RHSA-2022:0350RHSA-2022:0246RHEA-2022:5139RHEA-2022:5221RHEA-2022:5615RHEA-2022:4925
- nodejs12 SLE Module for Web and Scripting 12 12.22.9-1.38.1
- nodejs14 SLE Module for Web and Scripting 15 SP3, SLE Module for Web and Scripting 15 SP2 14.18.1-15.21.2
- nodejs12 SLE Module for Web and Scripting 15 SP3, SLE Module for Web and Scripting 15 SP2 12.22.7-4.22.1
- nodejs14 SLE Module for Web and Scripting 12 14.18.1-6.18.2
suse advisories SUSE-SU-2022:0101-1SUSE-SU-2021:3964-1SUSE-SU-2021:3940-1SUSE-SU-2021:3886-1
- nodejs12 openSUSE Leap 15.2 12.22.7-lp152.3.21.1
- nodejs14 openSUSE Leap 15.2 14.18.1-lp152.17.1
- nodejs14 openSUSE Leap 15.3 14.18.1-15.21.2
- nodejs12 openSUSE Leap 15.3 12.22.7-4.22.1
opensuse advisories openSUSE-SU-2021:1574-1openSUSE-SU-2021:1552-1openSUSE-SU-2021:3964-1openSUSE-SU-2021:3940-1
- npm AlmaLinux 8 1:6.14.15-1.14.18.2.2.module_el8.5.0+2618+8d46dafd
- npm AlmaLinux 8 1:6.14.15-1.14.18.2.2.module_el8.5.0+254+b4526b16
- nodejs AlmaLinux 8 1:14.18.2-2.module_el8.5.0+2618+8d46dafd
- nodejs AlmaLinux 8 1:14.18.2-2.module_el8.5.0+254+b4526b16
- nodejs-nodemon AlmaLinux 8 2.0.15-1.module_el8.6.0+2904+f21ad6f4
- nodejs-nodemon AlmaLinux 8 2.0.15-1.module_el8.5.0+2605+45d748af
- nodejs-nodemon AlmaLinux 8 2.0.15-1.module_el8.5.0+2618+8d46dafd
- nodejs-full-i18n AlmaLinux 8 1:14.18.2-2.module_el8.5.0+2618+8d46dafd
almalinux advisories ALSA-2022:0350
- nodejs Rocky Linux 8 1:14.18.2-2.module+el8.5.0+733+de4fee6c
- nodejs-nodemon Rocky Linux 8 2.0.15-1.module+el8.5.0+721+4c107270
- 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
rocky linux advisories RLSA-2022:0350
- nodejs Alpine 3.12, Alpine 3.11 12.22.6-r0
- nodejs Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 14.17.6-r0
alpine advisories ALPINE-CVE-2021-37712
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/isaacs/node-tar@1739408 commit
- github.com/isaacs/node-tar@2f1bca0 commit
- github.com/isaacs/node-tar@3aaf19b commit
- github.com/isaacs/node-tar@b6162c7 commit
- github.com/isaacs/node-tar@bb93ba2 commit
- github.com/isaacs/node-tar@d56f790 commit
- github.com/npm/node-tar/security/advisories/GHSA-qq89-hq3f-393p advisory
- 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-37712 updated cvss 8.1
nodejs-tar: Insufficient symlink protection due to directory cache poisoning using symbolic links allowing arbitrary file creation and overwrite
-
Red Hat OpenShift Service Mesh 2.0 servicemesh-grafana, servicemesh-prometheus, servicemesh-grafana-prometheusaffected: no fix available
-
Red Hat 3scale API Management Platform 2 systemaffected: no fix available “Fix deferred”
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/console-rhel8, rhacm2/mcm-topology-rhel8, rhacm2/console-header-rhel8affected: no fix available, no fix planned “Will not fix”
-
Red Hat OpenShift Container Platform 4 openshift4/ose-grafanaaffected: no fix planned “Will not fix”
-
Red Hat Openshift Container Storage 4 ocs4/mcg-core-rhel8 Red Hat OpenShift GitOps openshift-gitops-1/argocd-rhel8affected: no fix available
-
Red Hat Enterprise Linux AppStream (v. 8) nodejs 14.18.2-2.module+el8.5.0+13644+8d46dafd, nodejs 12.22.12-1.module+el8.6.0+15324+1f2c5d8d, 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.4.0+11732+c668cc9f, nodejs-nodemon 2.0.15-1.module+el8.5.0+13504+a2e74d91, +4 morefixed: vendor fix RHSA-2022:0350
-
Red Hat Enterprise Linux AppStream E4S (v. 8.1) nodejs 12.22.12-1.module+el8.1.0+15296+87b2f6ad, 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.16-1.12.22.12.1.module+el8.1.0+15296+87b2f6ad, nodejs-full-i18n 12.22.12-1.module+el8.1.0+15296+87b2f6adfixed: vendor fix RHEA-2022:4925
-
Red Hat Enterprise Linux AppStream EUS (v. 8.2) nodejs 12.22.12-1.module+el8.2.0+15322+a70ca0ab, 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.16-1.12.22.12.1.module+el8.2.0+15322+a70ca0ab, nodejs-full-i18n 12.22.12-1.module+el8.2.0+15322+a70ca0abfixed: vendor fix RHEA-2022:5221
show 4 moreshow fewer
-
Red Hat Enterprise Linux AppStream EUS (v.8.4) nodejs 14.18.2-2.module+el8.4.0+13643+6c0ebf22, nodejs 12.22.12-1.module+el8.4.0+15323+4d1cc445, 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.4.0+11732+c668cc9f, nodejs-nodemon 2.0.15-1.module+el8.4.0+13503+fc29810b, +4 morefixed: vendor fix RHEA-2022:5615
-
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 RHEL Workstation(v. 7) rh-nodejs14-nodejs 14.18.2-1.el7, rh-nodejs12-nodejs 12.22.12-2.el7, rh-nodejs14-npm 6.14.15-14.18.2.1.el7, rh-nodejs12-npm 6.14.16-12.22.12.2.el7, rh-nodejs14-nodejs-nodemon 2.0.3-6.el7 Red Hat Software Collections for RHEL(v. 7) rh-nodejs14-nodejs 14.18.2-1.el7, rh-nodejs12-nodejs 12.22.12-2.el7, rh-nodejs14-npm 6.14.15-14.18.2.1.el7, rh-nodejs12-npm 6.14.16-12.22.12.2.el7, rh-nodejs14-nodejs-nodemon 2.0.3-6.el7fixed: vendor fix RHSA-2022:4914
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/grc-ui-rhel8, rhacm2/search-ui-rhel8, rhacm2/console-ui-rhel8, rhacm2/application-ui-rhel8, rhacm2/kui-web-terminal-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-packnot affected: vulnerable code not present
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.6
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
1.86% chance of exploitation in the next 30 days, higher than 79% 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.6 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVD | 2.0 | 4.4 | AV:L/AC:M/Au:N/C:P/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, <4.4.18 >=5.0.0, <5.0.10 >=6.0.0, <6.1.9 |
4.4.18 5.0.10 6.1.9 |
Affected products
- npm node-tar
Classification
References
-
github.com
/npm/node-tar/security/advisories/GHSA-qq89-hq3f-393p
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/1739408d3122af897caefd09662bce2ea477533b
web
-
github.com
/isaacs/node-tar/commit/2f1bca027286c23e110b8dfc7efc10756fa3db5a
web
-
github.com
/isaacs/node-tar/commit/3aaf19b2501bbddb145d92b3322c80dcaed3c35f
web
-
github.com
/isaacs/node-tar/commit/b6162c7fafe797f856564ef37f4b82747f051455
web
-
github.com
/isaacs/node-tar/commit/bb93ba243746f705092905da1955ac3b0509ba1e
web
-
github.com
/isaacs/node-tar/commit/d56f790bda9fea807dd80c5083f24771dbdd6eb1
web
-
debian.org
/security/2021/dsa-5008
vendor-advisory, web, third-party-advisory
-
npmjs.com
/package/tar
web, product
-
lists.debian.org
/debian-lts-announce/2022/12/msg00023.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-37712
advisory
-
github.com
/npm/node-tar
package
Sources
- CVE List CVE-2021-37712
- GitHub Advisory GHSA-qq89-hq3f-393p
- NVD CVE-2021-37712
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.