CVE-2026-140242: node-tar: non-finite PAX size (Infinity) bypasses validation, causing extraction entry loss and an uncaught exception when re-packing
node-tar is a tar archive manipulation library for Node.js. From 7.0.0 until 7.5.24, tar: non-finite PAX size (Infinity) bypasses validation, causing extraction entry loss and an uncaught exception when re-packing. The affected security path includes tar, size, 17 size=Infinity\n. This issue is fixed in version 7.5.24.
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 7.5.24
Event History
Frequently Asked Questions
Which installations are affected?
Installations using npm/tar versions from 7.0.0 through versions before 7.5.24 are affected. The issue is fixed in version 7.5.24.
What input is needed to trigger the issue?
An attacker needs a tar archive containing a PAX size value of Infinity, such as the affected size=Infinity path. Processing that archive can cause extraction entries to be lost and can trigger an uncaught exception when the archive is re-packed.
What should we do if we cannot immediately upgrade?
The provided information identifies the malformed PAX size=Infinity value as the triggering input. Until upgrading to 7.5.24, avoid processing or re-packing untrusted tar archives that may contain such PAX metadata.