CVE-2021-37712
published high CVSS 3.1 · 8.2Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| npm | — | node-tar< 4.4.18 · >= 5.0.0, < 5.0.10 · >= 6.0.0, < 6.1.9 | Affected | Not stated | GitHub_M |
| Debian | bullseye | node-tar | Advisory build | 6.0.5+ds1+~cs11.3.9-1+deb11u2 | DSA-5008-1 |
| AlmaLinux | 8 | nodejs | Advisory build | 1:14.18.2-2.module_el8.5.0+254+b4526b16 | ALSA-2022:0350 |
| Alpine Linux | edge | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Oracle Linux | 8 | nodejsaarch64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejssrc | Advisory build | 12.22.12-2.el7 | RHSA-2022:4914 |
| Debian | buster | node-tar | Advisory build | 4.4.6+ds1-3+deb10u2 | DLA-3237-1 |
| AlmaLinux | 8 | nodejs | Advisory build | 1:14.18.2-2.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
Show 93 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| AlmaLinux | 8 | nodejs-devel | Advisory build | 1:14.18.2-2.module_el8.5.0+254+b4526b16 | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-devel | Advisory build | 1:14.18.2-2.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-docs | Advisory build | 1:14.18.2-2.module_el8.5.0+254+b4526b16 | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-docs | Advisory build | 1:14.18.2-2.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-full-i18n | Advisory build | 1:14.18.2-2.module_el8.5.0+254+b4526b16 | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-full-i18n | Advisory build | 1:14.18.2-2.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-nodemon | Advisory build | 2.0.15-1.module_el8.5.0+2605+45d748af | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-nodemon | Advisory build | 2.0.15-1.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-nodemon | Advisory build | 2.0.15-1.module_el8.6.0+2904+f21ad6f4 | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 23-3.module_el8.4.0+2522+3bd42762 | ALSA-2022:0350 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 23-3.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
| AlmaLinux | 8 | npm | Advisory build | 1:6.14.15-1.14.18.2.2.module_el8.5.0+254+b4526b16 | ALSA-2022:0350 |
| AlmaLinux | 8 | npm | Advisory build | 1:6.14.15-1.14.18.2.2.module_el8.5.0+2618+8d46dafd | ALSA-2022:0350 |
| Alpine Linux | v3.11 | nodejs | Fixed | 12.22.6-r0 | Package fix record |
| Alpine Linux | v3.12 | nodejs | Fixed | 12.22.6-r0 | Package fix record |
| Alpine Linux | v3.13 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.14 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.15 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.16 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.17 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.18 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.19 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.20 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.21 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.22 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.23 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Alpine Linux | v3.24 | nodejs | Fixed | 14.17.6-r0 | Package fix record |
| Oracle Linux | 8 | nodejsx86_64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-develaarch64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-develx86_64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-docsaarch64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-docsx86_64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-full-i18naarch64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-full-i18nx86_64 · nodejs · 14b | Advisory build | 1:14.18.2-2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-nodemonaarch64 · nodejs · 14b | Advisory build | 0:2.0.15-1.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-nodemonx86_64 · nodejs · 14b | Advisory build | 0:2.0.15-1.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-packagingaarch64 · nodejs · 14b | Advisory build | 0:23-3.module+el8.3.0+7818+6cd30d85 | ELSA-2022-0350 |
| Oracle Linux | 8 | nodejs-packagingx86_64 · nodejs · 14b | Advisory build | 0:23-3.module+el8.3.0+7818+6cd30d85 | ELSA-2022-0350 |
| Oracle Linux | 8 | npmaarch64 · nodejs · 14b | Advisory build | 1:6.14.15-1.14.18.2.2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Oracle Linux | 8 | npmx86_64 · nodejs · 14b | Advisory build | 1:6.14.15-1.14.18.2.2.module+el8.5.0+20489+261d51d3 | ELSA-2022-0350 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejsx86_64 | Advisory build | 12.22.12-2.el7 | RHSA-2022:4914 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-debuginfox86_64 | Advisory build | 12.22.12-2.el7 | RHSA-2022:4914 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-develx86_64 | Advisory build | 12.22.12-2.el7 | RHSA-2022:4914 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-docsnoarch | Advisory build | 12.22.12-2.el7 | RHSA-2022:4914 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-npmx86_64 | Advisory build | 6.14.16-12.22.12.2.el7 | RHSA-2022:4914 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejssrc | Advisory build | 14.18.2-1.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejsx86_64 | Advisory build | 14.18.2-1.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-debuginfox86_64 | Advisory build | 14.18.2-1.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-develx86_64 | Advisory build | 14.18.2-1.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-docsnoarch | Advisory build | 14.18.2-1.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-nodemonnoarch | Advisory build | 2.0.3-6.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-nodemonsrc | Advisory build | 2.0.3-6.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-npmx86_64 | Advisory build | 6.14.15-14.18.2.1.el7 | RHSA-2022:0041 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsaarch64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsaarch64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsppc64le | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsppc64le | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejss390x | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejss390x | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejssrc | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejssrc | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsx86_64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsx86_64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfoaarch64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfoaarch64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfoppc64le | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfoppc64le | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfos390x | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfos390x | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfox86_64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debuginfox86_64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsourceaarch64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsourceaarch64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsourceppc64le | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsourceppc64le | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsources390x | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsources390x | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsourcex86_64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-debugsourcex86_64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-develaarch64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-develaarch64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-develppc64le | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-develppc64le | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-devels390x | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-devels390x | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-develx86_64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-develx86_64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-docsnoarch | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-docsnoarch | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-full-i18naarch64 | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-full-i18naarch64 | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-full-i18nppc64le | Advisory build | 1:14.18.2-2.module+el8.4.0+13643+6c0ebf22 | RHSA-2022:0246 |
| Red Hat Enterprise Linux | RHEL-8 | nodejs-full-i18nppc64le | Advisory build | 1:14.18.2-2.module+el8.5.0+13644+8d46dafd | RHSA-2022:0350 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.2 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| npm | node-tar | < 4.4.18 (affected)>= 5.0.0, < 5.0.10 (affected)>= 6.0.0, < 6.1.9 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- CWE-59 CWE-59: Improper Link Resolution Before File Access ('Link Following')
References
6- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://github.com/npm/node-tar/security/advisories/GHSA-qq89-hq3f-393p
- [debian-lts-announce] 20221212 [SECURITY] [DLA 3237-1] node-tar security update https://lists.debian.org/debian-lts-announce/2022/12/msg00023.html
- DSA-5008 https://www.debian.org/security/2021/dsa-5008
- https://www.npmjs.com/package/tar
- https://www.oracle.com/security-alerts/cpuoct2021.html
Provider assertions
2GitHub_M · cna
Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- c469bd7daddfc10618edf217bebecf456f52e950b1e30ac9e5f2044d89b9d4af
- Ingested
- 23 Sep 2026, 07:55:20 UTC
- Source record
- Official CVE record