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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| npm | node-tar | < 3.2.2, >= 4.0.0, < 4.4.14, >= 5.0.0, < 5.0.6, >= 6.0.0, < 6.1.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-tar | 6.1.7+~cs11.3.10-1 | — |
| Debian 13 | node-tar | 6.1.7+~cs11.3.10-1 | — |
| Debian 12 | node-tar | 6.1.7+~cs11.3.10-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | node-tar | No fix yet | — |
| Ubuntu 26.04 LTS | node-tar | No fix yet | — |
| Ubuntu 25.10 | node-tar | No fix yet | — |
| Ubuntu 24.04 LTS | node-tar | No fix yet | — |
| Ubuntu 22.04 LTS | node-tar | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | node-tar | No fix yet | — |
| Ubuntu Pro 20.04 LTS | node-tar | No fix yet | — |
| Ubuntu Pro 16.04 LTS | node-tar | No fix yet | — |
| Ubuntu Pro 14.04 LTS | node-tar | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | nodejs +3 | 1:12.22.5-1.module+el8.4.0+12242+af52a4c7 | RHSA-2021:3666, RHSA-2021:3623 |
| RHEL 8 | nodejs-nodemon | 2.0.3-1.module+el8.3.0+6519+9f98ed83 | RHSA-2021:3666, RHSA-2021:3623 |
| RHEL 8 | nodejs-packaging | 17-3.module+el8.1.0+3369+37ae6a45 | RHSA-2021:3666, RHSA-2021:3623 |
| RHEL 8 | npm | 1:6.14.14-1.12.22.5.1.module+el8.4.0+12242+af52a4c7 | RHSA-2021:3666, RHSA-2021:3623 |
| RHEL 3 | rh-nodejs12-nodejs +2 | 12.22.5-1.el7 | RHSA-2021:3281 |
| RHEL 3 | rh-nodejs12-nodejs-nodemon +1 | 2.0.3-5.el7 | RHSA-2021:3281, RHSA-2021:3280 |
| RHEL 3 | rh-nodejs12-npm | 6.14.14-12.22.5.1.el7 | RHSA-2021:3281 |
| RHEL 3 | rh-nodejs14-nodejs +2 | 14.17.5-1.el7 | RHSA-2021:3280 |
| RHEL 3 | rh-nodejs14-npm | 6.14.14-14.17.5.1.el7 | RHSA-2021:3280 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8.2 EUS | nodejs +3 | 1:12.22.5-1.module+el8.2.0+12241+a3db445b | RHSA-2021:3638 |
| RHEL 8.2 EUS | nodejs-nodemon | 1.18.3-1.module+el8.1.0+3369+37ae6a45 | RHSA-2021:3638 |
| RHEL 8.2 EUS | nodejs-packaging | 17-3.module+el8.1.0+3369+37ae6a45 | RHSA-2021:3638 |
| RHEL 8.2 EUS | npm | 1:6.14.14-1.12.22.5.1.module+el8.2.0+12241+a3db445b | RHSA-2021:3638 |
| RHEL 8.1 EUS | nodejs +3 | 1:12.22.5-1.module+el8.1.0+12238+63fe3aec | RHSA-2021:3639 |
| RHEL 8.1 EUS | nodejs-nodemon | 1.18.3-1.module+el8.1.0+3369+37ae6a45 | RHSA-2021:3639 |
| RHEL 8.1 EUS | nodejs-packaging | 17-3.module+el8.1.0+3369+37ae6a45 | RHSA-2021:3639 |
| RHEL 8.1 EUS | npm | 1:6.14.14-1.12.22.5.1.module+el8.1.0+12238+63fe3aec | RHSA-2021:3639 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | nodejs +3 | 1:12.22.5-1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
| AlmaLinux 8 | nodejs-nodemon | 2.0.3-1.module_el8.4.0+2521+c668cc9f | ALSA-2021:3666, ALSA-2021:3623 |
| AlmaLinux 8 | nodejs-packaging | 17-3.module_el8.3.0+2023+d2377ea3 | ALSA-2021:3666, ALSA-2021:3623 |
| AlmaLinux 8 | npm | 1:6.14.14-1.12.22.5.1.module_el8.4.0+2529+af52a4c7 | ALSA-2021:3623 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | nodejs | 1:12.22.5-1.module+el8.4.0+647+e905fa21 | RLSA-2021:3666, RLSA-2021:3623 |
| Rocky Linux 8 | nodejs-nodemon | 2.0.3-1.module+el8.3.0+100+234774f7 | RLSA-2021:3666, RLSA-2021:3623 |
| Rocky Linux 8 | nodejs-packaging | 17-3.module+el8.3.0+101+f84c7154 | RLSA-2021:3666, RLSA-2021:3623 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SLES 15 SP3 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SLES 15 SP2 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLES 15 SP2 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLES 15 SP2 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SLES 15 SP2 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SLES 15 SP2 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SLES 15 SP1 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLES 15 SP1 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLES 15 SP1 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
| SLES 15 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLES 15 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLES 15 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
| SLES 12 | nodejs10 | 10.24.1-1.46.1 | SUSE-SU-2022:0570-1 |
| SLES 12 | nodejs12 | 12.22.10-1.42.2 | SUSE-SU-2022:0531-1 |
| SLES 12 | nodejs14 | 14.19.0-6.24.1 | SUSE-SU-2022:0569-1 |
Show 11 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP2 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLES for SAP 15 SP2 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLES for SAP 15 SP2 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SLES for SAP 15 SP2 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SLES for SAP 15 SP2 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SLES for SAP 15 SP1 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLES for SAP 15 SP1 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLES for SAP 15 SP1 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
| SLES for SAP 15 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLES for SAP 15 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLES for SAP 15 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
| SLE HPC 15 SP2 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLE HPC 15 SP2 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLE HPC 15 SP2 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SLE HPC 15 SP2 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SLE HPC 15 SP2 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SLE HPC 15 SP1 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLE HPC 15 SP1 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLE HPC 15 SP1 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
| SLE HPC 15 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SLE HPC 15 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SLE HPC 15 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
| SUSE Manager Server 4.1 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SUSE Manager Server 4.1 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SUSE Manager Server 4.1 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SUSE Manager Server 4.1 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SUSE Manager Server 4.1 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SUSE Manager Retail Branch Server 4.1 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SUSE Manager Retail Branch Server 4.1 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SUSE Manager Retail Branch Server 4.1 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SUSE Manager Retail Branch Server 4.1 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SUSE Manager Retail Branch Server 4.1 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SUSE Manager Proxy 4.1 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SUSE Manager Proxy 4.1 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SUSE Manager Proxy 4.1 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SUSE Manager Proxy 4.1 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SUSE Manager Proxy 4.1 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SUSE Enterprise Storage 7 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SUSE Enterprise Storage 7 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SUSE Enterprise Storage 7 | nodejs12 | 12.22.10-4.29.3 | SUSE-SU-2022:0657-1 |
| SUSE Enterprise Storage 7 | nodejs14 | 14.19.0-15.27.1 | SUSE-SU-2022:0715-1 |
| SUSE Enterprise Storage 7 | nodejs8 | 8.17.0-10.19.2 | SUSE-SU-2022:0704-1 |
| SUSE Enterprise Storage 6 | nodejs-common | 2.0-3.4.1 | SUSE-SU-2022:0704-1 |
| SUSE Enterprise Storage 6 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| SUSE Enterprise Storage 6 | nodejs8 | 8.17.0-3.54.2 | SUSE-SU-2022:0563-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.4 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| openSUSE Leap 15.3 | nodejs10 | 10.24.1-150000.1.44.1 | SUSE-SU-2022:1717-1 |
| openSUSE Leap 15.3 | nodejs12 | 12.22.10-4.29.3 | openSUSE-SU-2022:0657-1 |
| openSUSE Leap 15.3 | nodejs14 | 14.19.0-15.27.1 | openSUSE-SU-2022:0715-1 |
| openSUSE Leap 15.3 | nodejs8 | 8.17.0-10.19.2 | openSUSE-SU-2022:0704-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | nodejs +3 | 1:12.22.5-1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3666, ELSA-2021-3623 |
| Oracle Linux 8 | nodejs-nodemon | 2.0.3-1.module+el8.3.0+7818+6cd30d85 | ELSA-2021-3666, ELSA-2021-3623 |
| Oracle Linux 8 | nodejs-packaging | 17-3.module+el8.1.0+5393+aaf413e3 | ELSA-2021-3666, ELSA-2021-3623 |
| Oracle Linux 8 | npm | 1:6.14.14-1.12.22.5.1.module+el8.4.0+20308+065a70e3 | ELSA-2021-3666, ELSA-2021-3623 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
yamory/CVE-2021-32804 ★ 1 · Aug 31, 2021
-
federiconbaez/cortex9-node-tar-path-sanitization-model ★ 0 · Nov 6, 2026
Offline Python port of node-tar path sanitization (CVE-2021-32804, CVE-2021-37713) with a differential check against the original CHECKPATH logic. No archives are extracted.
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | tar | < 3.2.2 | 3.2.2 | GHSA-3jfq-g458-7qm9 |
| npm | tar | >= 4.0.0, < 4.4.14 | 4.4.14 | GHSA-3jfq-g458-7qm9 |
| npm | tar | >= 5.0.0, < 5.0.6 | 5.0.6 | GHSA-3jfq-g458-7qm9 |
| npm | tar | >= 6.0.0, < 6.1.1 | 6.1.1 | GHSA-3jfq-g458-7qm9 |
Advisories 32
- ALSA-2021:3666 Important: nodejs:14 security and bug fix update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2021:3623 Important: nodejs:12 security and bug fix update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2021:3639 Red Hat Security Advisory: nodejs:12 security and bug fix update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2021:3666 Red Hat Security Advisory: nodejs:14 security and bug fix update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2021:3623 Red Hat Security Advisory: nodejs:12 security and bug fix update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2021:3638 Red Hat Security Advisory: nodejs:12 security and bug fix update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2021:3281 Red Hat Security Advisory: rh-nodejs12-nodejs and rh-nodejs12-nodejs-nodemon security update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2021:3280 Red Hat Security Advisory: rh-nodejs14-nodejs and rh-nodejs14-nodejs-nodemon security update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- WID-SEC-2022-1603 IBM Tivoli Netcool/OMNIbus: Mehrere Schwachstellen BSI CERT-Bund (WID) · Mar 24, 2026
- RLSA-2021:3623 Important: nodejs:12 security and bug fix update Rocky Linux Security Advisories · Feb 5, 2026
- RLSA-2021:3666 Important: nodejs:14 security and bug fix update Rocky Linux Security Advisories · Feb 4, 2026
- SUSE-SU-2022:0657-1 Security update for nodejs12 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0531-1 Security update for nodejs12 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2022:0704-1 Security update for nodejs8 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0704-1 Security update for nodejs8 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0569-1 Security update for nodejs14 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0715-1 Security update for nodejs14 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:1717-1 Security update for nodejs10 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2022:0715-1 Security update for nodejs14 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0570-1 Security update for nodejs10 SUSE / openSUSE Security Updates · Feb 4, 2026
- FSA-202302 Festo: Several vulnerabilities in FactoryViews CERT@VDE · Feb 2, 2026
- openSUSE-SU-2022:0657-1 Security update for nodejs12 SUSE / openSUSE Security Updates · May 7, 2025
- ICSA-22-069-09 Siemens SINEC INS CISA ICS & IT advisories · May 6, 2025
- SUSE-SU-2022:0563-1 Security update for nodejs8 SUSE / openSUSE Security Updates · May 2, 2025
- WID-SEC-2024-1591 Juniper JUNOS: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 11, 2024
- WID-SEC-2022-0092 Node.js: Mehrere Schwachstellen ermöglichen Manipulation von Dateien BSI CERT-Bund (WID) · May 9, 2024
- WID-SEC-2023-0809 IBM QRadar SIEM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Feb 19, 2024
- WID-SEC-2023-0857 IBM QRadar SIEM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 4, 2023
- WID-SEC-2023-0856 IBM QRadar SIEM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 4, 2023
- SSA-389290 SSA-389290: Third-Party Component Vulnerabilities in SINEC INS Siemens ProductCERT · Mar 8, 2022
- ELSA-2021-3666 Important: nodejs:14 security and bug fix update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Sep 27, 2021
- ELSA-2021-3623 Important: nodejs:12 security and bug fix update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Sep 22, 2021
References
- https://www.npmjs.com/package/tar
- https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9
- https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4
- https://www.npmjs.com/advisories/1770
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf