CVE-2026-140237: node-tar: ReadEntry: pending PAX size reapplication permits metadata-body file smuggling
node-tar is a tar archive manipulation library for Node.js. From 7.0.0 until 8.0.0, readEntry: pending PAX size reapplication permits metadata-body file smuggling after the 7.5.16 fix. Applications that inspect attacker-controlled tar archives with a parser that correctly consumes the second PAX metadata body, then extract them with node-tar, can be affected. A member absent from the inspected member set is treated by node-tar as a real entry and can create or truncate a file inside the configured extraction directory. This can bypass archive member allowlists, malware scanning, or policy checks when the inspection and extraction layers use different tar implementations. This issue is fixed in version 8.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.0.0
Event History
Frequently Asked Questions
Which applications are realistically exposed to this issue?
Applications are affected when they inspect attacker-controlled tar archives with a parser that correctly consumes the second PAX metadata body and then extract the same archive using node-tar. This split-parser workflow can cause node-tar to extract a member that was absent from the inspected member set.
What can exploitation achieve?
An attacker can cause node-tar to treat an uninspected member as a real entry and create or truncate a file within the configured extraction directory. This can bypass member allowlists, malware scanning, or other archive policy checks.
Are all node-tar extraction workflows affected?
The described exposure specifically requires different implementations for inspection and extraction, with the inspection parser correctly consuming the second PAX metadata body and node-tar performing extraction. The data does not establish impact for workflows that do not inspect archives first or that use the same behavior in both layers.
What is the remediation?
Update node-tar to version 8.0.0, which fixes the issue. The affected versions are from 7.0.0 until 8.0.0.