node-tar 8.0.0 fixes two archive handling vulnerabilities in the npm tar package. Versions before 8.0.0 are affected by CVE-2026-140238 and CVE-2026-140244. Teams that extract untrusted archives should update the installed dependency and check the version actually used by their application.
The first flaw can redirect an archive entry to overwrite a file within the extraction target. A Windows npm installation can reach code execution only under additional conditions. The second flaw plants a symlink that points outside the extraction root; a later consumer must follow it for a file read. These are separate attack paths described in the project’s November 28 advisories.
node-tar 8.0.0: Which Versions and Uses Need Attention?
Both advisories list 8.0.0 as the patched version. The first names every version before 8.0.0, including 7.5.22; the second names versions through 7.5.22. The table keeps the two outcomes separate because an archive-time overwrite and a later read require different checks.
| Advisory | Affected package | Fixed version | Condition and outcome |
|---|---|---|---|
| CVE-2026-140238 | npm tar before 8.0.0 | 8.0.0 | Crafted PAX metadata can redirect an entry and overwrite a file inside the extraction target. |
| CVE-2026-140244 | npm tar through 7.5.22 | 8.0.0 | A planted symlink can lead outside the root when another process later follows it. |
For dependency inventory and prioritization, the vulnerability intelligence platform page is a related product resource. The software supply chain security framework gives broader context for dependency ownership. Neither changes the fixed version stated in the advisories.
Why Do the Two Archive Flaws Behave Differently?
In the PAX advisory, the parser treats an embedded newline as a new record boundary instead of enforcing the declared byte length. An attacker who controls archive content can forge entry attributes, including the path. Direct extraction without stripping can then overwrite an unexpected file under the extraction target on POSIX or Windows.
The advisory also reports a reproduced Windows npm chain involving path normalization, one stripped path component, an overwritten package manifest, and later execution of an injected installation script. This is a published reproduction, not evidence of attacks in the wild. The advisory says the same npm chain does not work on POSIX with that stripping behavior.
In the symlink advisory, a lexical containment check collapses parent components before considering an earlier symlink in the archive. Extraction can leave a link whose real target is outside the root. A later process that reads, serves, copies, or archives that tree may follow the link and disclose a file. The advisory says hardlinks and subsequent writes through that link remain blocked.
What Should Archive Consumers Do Now?
Start with applications and build jobs that accept archives from parties outside your trust boundary. Identify the installed tar version in each deployed dependency tree, including transitive installations. The software supply chain risk management guide offers a wider method for recording dependency ownership and decisions.
- Update npm tarMove affected installations to 8.0.0 or later.
- Verify the deployed treeConfirm the lockfile and deployed package resolve to the patched release.
- Review extraction pathsPrioritize untrusted archives processed without stripping or on Windows npm hosts.
- Inspect downstream useCheck whether a later reader follows symlinks in an extracted tree.
Keep extraction targets isolated while the update rolls out, and avoid using extracted trees as trusted inputs without validating their contents. This is our containment recommendation, not a claim that the package update repairs previously extracted files. If an archive was processed before patching, assess its destination files and symlinks before another workflow consumes them.
GitHub’s advisories classify both reports as Moderate, while NVD lists a CVSS 4.0 score of 7.2 High for each. The symlink report also includes the researcher’s estimated CVSS 3.1 score of 5.9. The PAX record and NVD record do not supply a CVSS 3.1 score. Use the actual archive workflow and the conditions above when setting patch order.
Frequently Asked Questions
Which node-tar version fixes CVE-2026-140238 and CVE-2026-140244?
The project's advisories name npm tar 8.0.0 as the patched version for both vulnerabilities. Verify the version installed in each deployed dependency tree.
Does the symlink flaw write outside the extraction root?
The advisory describes a planted out-of-root symlink and a possible later file read. It says writes through the link and hardlinks remain blocked.
Does the PAX flaw make every npm install execute code?
No. The advisory's reproduced execution chain requires Windows npm path handling, a stripped component, an overwritten package manifest, and later script execution.
