GHSA-3jfq-g458-7qm9 · Severity: high · Ecosystem: npm — Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization
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.
Conclusion & alert: CVE-2021-32804 is rated High Risk (67/100): CVSS High severity, with high exploitation likelihood (EPSS 84.98%, 99th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-01-29 | 85.52% | 84.98% | -0.53% |
| 2 | 2025-11-21 | 16.95% | 85.52% | +68.56% |
| 3 | 2025-11-18 | — | 16.95% | — |
Full EPSS history (28 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 8.2 | 3.1 | HIGH |
|
1.8 | 5.8 | [email protected] |
| 8.1 | 3.1 | HIGH |
|
2.8 | 5.2 | [email protected] |
| 5.8 | 2.0 | MEDIUM |
|
8.6 | 4.9 | [email protected] |
GHSA-3jfq-g458-7qm9 · Severity: high · Ecosystem: npm — Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization
| vendor | priority | summary | link |
|---|---|---|---|
alpine
|
high | CVE-2021-32804: 1 source package rows (tar); 38 state rows across 10 repos (3.11-main, 3.12-main, 3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, 3.23-main, edge-main); fixed 36, open 2. | https://security.alpinelinux.org/vuln/CVE-2021-32804 |
debian
|
not yet assigned | CVE-2021-32804 not yet assigned priority: Debian including 1 source packages (node-tar), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. | https://security-tracker.debian.org/tracker/CVE-2021-32804 |
redhat
|
medium | — | https://access.redhat.com/security/cve/CVE-2021-32804 |
suse
|
high | CVE-2021-32804 severity important: SUSE including 61 source package names (12-11.15:nodejs12-12.22.10-4.29.3, 12-11.15:npm12-12.22.10-4.29.3, …), 387 product×package rows across 34 product lines (Container bci/nodejs, SUSE CaaS Platform 4.0, … (34 product lines)): Fixed 367, Known Not Affected 20. | https://www.suse.com/security/cve/CVE-2021-32804/ |
ubuntu
|
medium | CVE-2021-32804 medium priority: Ubuntu including 1 source packages (node-tar), 15 status rows across 15 suites (bionic, focal, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): needs-triage 8, ignored 7. | https://ubuntu.com/security/CVE-2021-32804 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| tar_project | tar | < 3.2.2 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| tar_project | tar | >= 4.0.0, < 4.4.14 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| tar_project | tar | >= 5.0.0, < 5.0.6 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| tar_project | tar | >= 6.0.0, < 6.1.1 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| oracle | graalvm | 20.3.3 | cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:* |
| oracle | graalvm | 21.2.0 | cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:* |
| siemens | sinec_infrastructure_network_services | < 1.0.1.1 | cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* |
| URL | Tags |
|---|---|
| https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf | Patch Third Party Advisory |
| https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4 | Patch Third Party Advisory |
| https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9 | Mitigation Third Party Advisory |
| https://www.npmjs.com/advisories/1770 | Mitigation Third Party Advisory |
| https://www.npmjs.com/package/tar | Product Third Party Advisory |
| https://www.oracle.com/security-alerts/cpuoct2021.html | Patch Third Party Advisory |