CVE-2021-32804
published high CVSS 3.1 · 8.2Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| npm | — | node-tar< 3.2.2 · >= 4.0.0, < 4.4.14 · >= 5.0.0, < 5.0.6 · >= 6.0.0, < 6.1.1 | Affected | Not stated | GitHub_M |
| AlmaLinux | 8 | nodejs | Advisory build | 1:12.22.5-1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
| Alpine Linux | edge | tar | Fixed | 0 | Package fix record |
| Oracle Linux | 8 | nodejsaarch64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejsppc64le | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| AlmaLinux | 8 | nodejs | Advisory build | 1:12.22.5-1.module_el8.5.0+85+79a7b441 | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-devel | Advisory build | 1:12.22.5-1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-devel | Advisory build | 1:12.22.5-1.module_el8.5.0+85+79a7b441 | ALSA-2021:3623 |
Show 93 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| AlmaLinux | 8 | nodejs-docs | Advisory build | 1:12.22.5-1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-full-i18n | Advisory build | 1:12.22.5-1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-full-i18n | Advisory build | 1:12.22.5-1.module_el8.5.0+85+79a7b441 | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-nodemon | Advisory build | 2.0.3-1.module_el8.4.0+2521+c668cc9f | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-nodemon | Advisory build | 2.0.3-1.module_el8.4.0+2521+c668cc9f | ALSA-2021:3666 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 17-3.module_el8.3.0+2023+d2377ea3 | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 17-3.module_el8.4.0+2224+b07ac28e | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 17-3.module_el8.4.0+2521+c668cc9f | ALSA-2021:3623 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 23-3.module_el8.4.0+2522+3bd42762 | ALSA-2021:3666 |
| AlmaLinux | 8 | nodejs-packaging | Advisory build | 23-3.module_el8.5.0+254+b4526b16 | ALSA-2021:3666 |
| AlmaLinux | 8 | npm | Advisory build | 1:6.14.14-1.12.22.5.1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
| AlmaLinux | 8 | npm | Advisory build | 1:6.14.14-1.12.22.5.1.module_el8.5.0+85+79a7b441 | ALSA-2021:3623 |
| Alpine Linux | v3.16 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.17 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.18 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.19 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.20 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.21 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.22 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.23 | tar | Fixed | 0 | Package fix record |
| Alpine Linux | v3.24 | tar | Fixed | 0 | Package fix record |
| Oracle Linux | 8 | nodejsaarch64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejsx86_64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejsx86_64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-develaarch64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-develaarch64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-develx86_64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-develx86_64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-docsaarch64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-docsaarch64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-docsx86_64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-docsx86_64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-full-i18naarch64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-full-i18naarch64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-full-i18nx86_64 · nodejs · 12b | Advisory build | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-full-i18nx86_64 · nodejs · 14b | Advisory build | 1:14.17.5-1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-nodemonaarch64 · nodejs · 12b | Advisory build | 0:2.0.3-1.module+el8.4.0+20281+eb64e322 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-nodemonaarch64 · nodejs · 14b | Advisory build | 0:2.0.3-1.module+el8.3.0+7818+6cd30d85 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-nodemonx86_64 · nodejs · 12b | Advisory build | 0:2.0.3-1.module+el8.4.0+20281+eb64e322 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-nodemonx86_64 · nodejs · 14b | Advisory build | 0:2.0.3-1.module+el8.3.0+7818+6cd30d85 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-packagingaarch64 · nodejs · 12b | Advisory build | 0:17-3.module+el8.1.0+5393+aaf413e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-packagingaarch64 · nodejs · 14b | Advisory build | 0:23-3.module+el8.3.0+7818+6cd30d85 | ELSA-2021-3666 |
| Oracle Linux | 8 | nodejs-packagingx86_64 · nodejs · 12b | Advisory build | 0:17-3.module+el8.1.0+5393+aaf413e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | nodejs-packagingx86_64 · nodejs · 14b | Advisory build | 0:23-3.module+el8.3.0+7818+6cd30d85 | ELSA-2021-3666 |
| Oracle Linux | 8 | npmaarch64 · nodejs · 12b | Advisory build | 1:6.14.14-1.12.22.5.1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | npmaarch64 · nodejs · 14b | Advisory build | 1:6.14.14-1.14.17.5.1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Oracle Linux | 8 | npmx86_64 · nodejs · 12b | Advisory build | 1:6.14.14-1.12.22.5.1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3623 |
| Oracle Linux | 8 | npmx86_64 · nodejs · 14b | Advisory build | 1:6.14.14-1.14.17.5.1.module+el8.4.0+20313+f90c2973 | ELSA-2021-3666 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejss390x | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejssrc | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejsx86_64 | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-debuginfoppc64le | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-debuginfos390x | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-debuginfox86_64 | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-develppc64le | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-devels390x | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-develx86_64 | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-docsnoarch | Advisory build | 12.22.5-1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-nodemonnoarch | Advisory build | 2.0.3-5.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-nodejs-nodemonsrc | Advisory build | 2.0.3-5.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-npmppc64le | Advisory build | 6.14.14-12.22.5.1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-npms390x | Advisory build | 6.14.14-12.22.5.1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs12-npmx86_64 | Advisory build | 6.14.14-12.22.5.1.el7 | RHSA-2021:3281 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejsppc64le | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejss390x | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejssrc | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejsx86_64 | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-debuginfoppc64le | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-debuginfos390x | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-debuginfox86_64 | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-develppc64le | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-devels390x | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-develx86_64 | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-docsnoarch | Advisory build | 14.17.5-1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-nodemonnoarch | Advisory build | 2.0.3-5.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-nodejs-nodemonsrc | Advisory build | 2.0.3-5.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-npmppc64le | Advisory build | 6.14.14-14.17.5.1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-npms390x | Advisory build | 6.14.14-14.17.5.1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-7 | rh-nodejs14-npmx86_64 | Advisory build | 6.14.14-14.17.5.1.el7 | RHSA-2021:3280 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsaarch64 | Advisory build | 1:12.22.5-1.module+el8.1.0+12238+63fe3aec | RHSA-2021:3639 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsaarch64 | Advisory build | 1:12.22.5-1.module+el8.2.0+12241+a3db445b | RHSA-2021:3638 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsaarch64 | Advisory build | 1:12.22.5-1.module+el8.4.0+12242+af52a4c7 | RHSA-2021:3623 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsaarch64 | Advisory build | 1:14.17.5-1.module+el8.4.0+12247+e2879e58 | RHSA-2021:3666 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsppc64le | Advisory build | 1:12.22.5-1.module+el8.1.0+12238+63fe3aec | RHSA-2021:3639 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsppc64le | Advisory build | 1:12.22.5-1.module+el8.2.0+12241+a3db445b | RHSA-2021:3638 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsppc64le | Advisory build | 1:12.22.5-1.module+el8.4.0+12242+af52a4c7 | RHSA-2021:3623 |
| Red Hat Enterprise Linux | RHEL-8 | nodejsppc64le | Advisory build | 1:14.17.5-1.module+el8.4.0+12247+e2879e58 | RHSA-2021:3666 |
| Red Hat Enterprise Linux | RHEL-8 | nodejss390x | Advisory build | 1:12.22.5-1.module+el8.1.0+12238+63fe3aec | RHSA-2021:3639 |
| Red Hat Enterprise Linux | RHEL-8 | nodejss390x | Advisory build | 1:12.22.5-1.module+el8.2.0+12241+a3db445b | RHSA-2021:3638 |
| Red Hat Enterprise Linux | RHEL-8 | nodejss390x | Advisory build | 1:12.22.5-1.module+el8.4.0+12242+af52a4c7 | RHSA-2021:3623 |
| Red Hat Enterprise Linux | RHEL-8 | nodejss390x | Advisory build | 1:14.17.5-1.module+el8.4.0+12247+e2879e58 | RHSA-2021:3666 |
| Red Hat Enterprise Linux | RHEL-8 | nodejssrc | Advisory build | 1:12.22.5-1.module+el8.1.0+12238+63fe3aec | RHSA-2021:3639 |
| Red Hat Enterprise Linux | RHEL-8 | nodejssrc | Advisory build | 1:12.22.5-1.module+el8.2.0+12241+a3db445b | RHSA-2021:3638 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
The npm package "tar" (aka node-tar) before versions 6.1.1, 5.0.6, 4.4.14, and 3.3.2 has a arbitrary File Creation/Overwrite vulnerability due to insufficient absolute path sanitization. node-tar aims to prevent extraction of absolute file paths by turning absolute paths into relative paths when the `preservePaths` flag is not set to `true`. This is achieved by stripping the absolute path root from any absolute file paths contained in a tar file. For example `/home/user/.bashrc` would turn into `home/user/.bashrc`. This logic was insufficient when file paths contained repeated path roots such as `////home/user/.bashrc`. `node-tar` would only strip a single path root from such paths. When given an absolute file path with repeating path roots, the resulting path (e.g. `///home/user/.bashrc`) would still resolve to an absolute path, thus allowing arbitrary file creation and overwrite. This issue was addressed in releases 3.2.2, 4.4.14, 5.0.6 and 6.1.1. Users may work around this vulnerability without upgrading by creating a custom `onentry` method which sanitizes the `entry.path` or a `filter` method which removes entries with absolute paths. See referenced GitHub Advisory for details. Be aware of CVE-2021-32803 which fixes a similar bug in later versions of tar.
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 | < 3.2.2 (affected)>= 4.0.0, < 4.4.14 (affected)>= 5.0.0, < 5.0.6 (affected)>= 6.0.0, < 6.1.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
6- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
- https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4
- https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9
- https://www.npmjs.com/advisories/1770
- https://www.npmjs.com/package/tar
- https://www.oracle.com/security-alerts/cpuoct2021.html
Provider assertions
2GitHub_M · cna
Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- b8f8a4172d504ced3138c3d5de49886fcde6ca2a019aa4dafa08b4b8768b3038
- Ingested
- 23 Sep 2026, 07:54:30 UTC
- Source record
- Official CVE record