CVE-2026-140248: node-tar: Nested symlink target can escape node-tar extraction root

Published Dec 1, 2026
·
Updated

node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, with preservePaths disabled, a crafted archive can first create an in-root symlink and then create a second SymbolicLink whose linkpath traverses that symlink followed by a parent component. STRIPABSOLUTEPATH evaluates the target lexically, while the filesystem follows the first symlink before applying the parent traversal. The resulting link remains inside the extraction tree but points outside it; access outside the root occurs when a later consumer follows the planted link. This issue is fixed in version 8.0.0.

Affected Software

1 affected component
npm/tar>=7.5.22<8.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/tar to a version that resolves this vulnerability.

    Fixed in 8.0.0

Event History

Dec 1, 2026
CVE Published
via MITRE·05:56 PM
Data Sourced
via MITRE·05:56 PM
DescriptionWeakness
Data Sourced
via OSV·05:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using node-tar versions from 7.5.22 up to, but not including, 8.0.0 are affected when extracting attacker-crafted archives with preservePaths disabled.

2

What must an attacker control to exploit this issue?

An attacker needs to supply a crafted tar archive that creates an in-root symlink followed by a second symbolic link whose target traverses that symlink and then a parent directory component. The out-of-root access occurs only if a later consumer follows the planted link.

3

Does exploitation directly write files outside the extraction directory?

The crafted link itself remains within the extraction tree, but it points outside that tree. Access outside the root happens later when software follows the planted symbolic link.

4

What is the available remediation?

Upgrade node-tar to version 8.0.0, which fixes the issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203