CVE-2026-140239: node-tar: Global PAX extended header injects attacker-controlled linkpath into tar.Parser entries, bypassing strict-mode validation

Published Dec 1, 2026
·
Updated

node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, a PAX Global Extended Header containing linkpath can populate entry.linkpath on every entry returned by tar.Parser without a strict-mode warning. Direct tar.Parser or tar.list consumers that trust this value can create paths or symlinks outside their intended directory, resulting in arbitrary file read or write. Node-tar's own tar.x and tar.extract operations are not affected because Unpack separately rejects an escaping linkpath. This issue is fixed in version 8.0.0.

Affected Software

1 affected component
npm/tar<8.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.0.0

Event History

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

Frequently Asked Questions

1

Which uses of node-tar are affected?

Applications using tar.Parser directly or tar.list and then trusting entry.linkpath are affected. node-tar's own tar.x and tar.extract operations are not affected because Unpack independently rejects an escaping linkpath.

2

What must an attacker provide to exploit this issue?

An attacker needs to supply a tar archive containing a PAX Global Extended Header with a linkpath value. That value can then populate entry.linkpath for every entry returned by tar.Parser without a strict-mode warning.

3

Does enabling strict mode prevent the issue?

No. The malicious global linkpath is applied without a strict-mode warning, so consumers cannot rely on strict-mode validation to identify it.

4

What is the remediation?

Upgrade node-tar to version 8.0.0. If upgrading is not immediately possible, avoid trusting entry.linkpath from tar.Parser or tar.list when processing untrusted archives, and reject link paths that escape the intended directory.

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