node-tarに、細工したアーカイブで抽出先の外にリンクを作られる脆弱性
Summary
node-tarの7.5.5から8.0.0より前の版では、連鎖したシンボリックリンクを含むアーカイブを展開すると、展開先の外を指すリンクが作られる脆弱性があります。アプリケーションがそのリンクをたどると、アプリケーションの権限で外部のファイルを読まれたり書き換えられたりするおそれがあります。修正版は8.0.0です。CVSS v4.0のスコアは7.2で、公表されたばかりのため、悪用の報告は今のところ確認されていません。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
node-tarの7.5.5から8.0.0より前の版では、連鎖したシンボリックリンクを含むアーカイブを展開すると、展開先の外を指すリンクが作られる脆弱性があります。アプリケーションがそのリンクをたどると、アプリケーションの権限で外部のファイルを読まれたり書き換えられたりするおそれがあります。修正版は8.0.0です。CVSS v4.0のスコアは7.2で、公表されたばかりのため、悪用の報告は今のところ確認されていません。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| isaacsnode-tar | — | Not listed |
| npmtar |
< 8.0.0→ 8.0.0 |
8.0.0 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-140250 node-tar No fixed version in this record
Original description The description as published by the source.
Summary
With default options, tar.x() in tar@7.5.22 (and every release since 7.5.5) extracts a symbolic link that resolves outside the extraction directory when the link target passes through another symlink from the same archive and then uses .. — for example sub/up -> .. followed by esc -> sub/up/... Both symlink-target checks collapse .. lexically before considering symlinks, so the intermediate symlink is never seen, while the kernel resolves it before applying ... With enough nesting the extracted link resolves to /.
This breaks the README guarantee that "Link and SymbolicLink entries are not allowed to target locations outside of the extraction folder", and gives any application that later reads or writes extracted paths file read/write outside the extraction root (the same impact model as GHSA-9ppj-qmqm-q256). It is a regression of the containment added for GHSA-8qq5-rm4j-mr97 (7.5.3–7.5.4 reject the chain; 7.5.5–7.5.22 accept it), and it also bypasses the [SYMLINK] check added for GHSA-83g3-92jg-28cx. A self-contained PoC, measured version matrix, and a remote-read deployment example are below.
Details
Malicious archive
Three entries, no file contents needed:
sub/ Directory
sub/up SymbolicLink -> .. lexical: "sub/.." = "." (inside)
esc SymbolicLink -> sub/up/.. lexical: "sub/up/.." = "sub" (inside)
On disk, the kernel resolves esc as sub/up → , then `..` → **parent of **.
#…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com