GHSA-r628-mhmh-qjhw · Severity: high · Ecosystem: npm — Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning
The npm package "tar" (aka node-tar) before versions 6.1.2, 5.0.7, 4.4.15, and 3.2.3 has an arbitrary File Creation/Overwrite vulnerability via insufficient symlink protection. `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 the same name as the directory. This order of operations resulted in the directory being created and added to the `node-tar` directory cache. When a directory is present in the directory cache, subsequent calls to mkdir for that directory are skipped. However, this is also where `node-tar` checks for symlinks occur. By first creating a directory, and then replacing that directory with a symlink, 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. This issue was addressed in releases 3.2.3, 4.4.15, 5.0.7 and 6.1.2.
Conclusion & alert: CVE-2021-32803 is rated Moderate Risk (43.5/100): CVSS High severity, with low exploitation likelihood (EPSS 0.12%). Mandatory action: Review affected assets and schedule 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-05-06 | 0.16% | 0.12% | -0.04% |
| 2 | 2026-03-15 | 0.15% | 0.16% | +0.01% |
| 3 | 2026-02-19 | — | 0.15% | — |
Full EPSS history (17 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-r628-mhmh-qjhw · Severity: high · Ecosystem: npm — Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning
| vendor | priority | summary | link |
|---|---|---|---|
alpine
|
high | CVE-2021-32803: 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-32803 |
debian
|
not yet assigned | CVE-2021-32803 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-32803 |
redhat
|
medium | — | https://access.redhat.com/security/cve/CVE-2021-32803 |
suse
|
high | CVE-2021-32803 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-32803/ |
ubuntu
|
medium | CVE-2021-32803 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): not-affected 11, released 2, ignored 1, needs-triage 1. | https://ubuntu.com/security/CVE-2021-32803 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| tar_project | tar | < 3.2.3 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| tar_project | tar | >= 4.0.0, < 4.4.15 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| tar_project | tar | >= 5.0.0, < 5.0.7 | cpe:2.3:a:tar_project:tar:*:*:*:*:*:node.js:*:* |
| tar_project | tar | >= 6.0.0, < 6.1.2 | 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/9dbdeb6df8e9dbd96fa9e84341b9d74734be6c20 | Patch Third Party Advisory |
| https://github.com/npm/node-tar/security/advisories/GHSA-r628-mhmh-qjhw | Mitigation Third Party Advisory |
| https://www.npmjs.com/advisories/1771 | 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 |