CVE Professor
/
All CVEs
CVE-2026-140242

CVE-2026-140242 — Tar — CWE-1284

HIGH CVSS 7.1 ⚡ EPSS 0.9% GitHub

## Summary `tar` (node-tar) does not validate that a numeric `size` value supplied through a PAX extended header (typeflag `x`) is finite before it is applied to the following archive entry. A PAX record such as `17 size=Infinity\n` is coerced to the JavaScript number `Infinity` and accepted, because the only guard on the value is a `>= 0` check and `Infinity >= 0` is true. The non-finite size then propagates into the entry-body state machine and, when the entry is re-packed, into numeric header encoding. Any process that parses, extracts, lists, or re-packs an attacker-supplied archive is affected; no authentication or non-default configuration is required. ## Root Cause The PAX key/value parser assigns the `size` field after a check that was designed only to reject negative values. It never checks that the coerced number is finite or a safe integer, so `Infinity` (and other non-finite positive values) pass. ```typescript // src/pax.ts (parseKVLine) case 'size': const s = +v // +"Infinity" === Infinity if (s >= 0) set[k] = s // Infinity >= 0 is true, so size is set to Infinity break ``` The `>= 0` guard was added to reject negative sizes. It does not enforce finiteness. The secondary guard `notNegative()` in `src/header.ts` has the same gap: `Infinity < 0` is false, so it returns `Infinity` unchanged. As a result the entry's `size` becomes `Infinity` and reaches two distinct sinks: the parser body-length state machine and the numeric header encoder use

## Summary `tar` (node-tar) does not validate that a numeric `size` value supplied through a PAX extended header (typeflag `x`) is finite before it is applied to the following archive entry. A PAX record such as `17 size=Infinity\n` is coerced to the JavaScript number `Infinity` and accepted, because the only guard on the value is a `>= 0` check and `Infinity >= 0` is true. The non-finite size then propagates into the entry-body state machine and, when the entry is re-packed, into numeric header encoding. Any process that parses, extracts, lists, or re-packs an attacker-supplied archive is affected; no authentication or non-default configuration is required. ## Root Cause The PAX key/value parser assigns the `size` field after a check that was designed only to reject negative values. It never checks that the coerced number is finite or a safe integer, so `Infinity` (and other non-finite positive values) pass. ```typescript // src/pax.ts (parseKVLine) case 'size': const s = +v // +"Infinity" === Infinity if (s >= 0) set[k] = s // Infinity >= 0 is true, so size is set to Infinity break ``` The `>= 0` guard was added to reject negative sizes. It does not enforce finiteness. The secondary guard `notNegative()` in `src/header.ts` has the same gap: `Infinity < 0` is false, so it returns `Infinity` unchanged. As a result the entry's `size` becomes `Infinity` and reaches two distinct sinks: the parser body-length state machine and the numeric header encoder use

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction Passive UI:P
Vuln. Conf. None VC:N
Vuln. Integrity Low VI:L
Vuln. Avail. High VA:H
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
EPSS — Exploit Prediction Scoring System
0.9%
30-day probability
In the 61. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-140242
CVSS 7.1/10 · HIGH · 01.12.2026
CWE: CWE-1284
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
Summary: ## Summary

tar (node-tar) does not validate that a numeric size value supplied through a PAX extended header (typeflag x) is finite before it is applied to the following archive entry. A PAX record such as 17 size=Infinity\n is coerced to the JavaScript number Infinity and accepted, because the only guard on the value is a >= 0 check and Infinity >= 0 is true. The non-finite size…
Affected: tar

⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · user interaction required (UI:R) · low attack complexity (AC:L).

🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); limited integrity modification (I:L); service can be completely taken down.

🛡️ REMEDIATION
→ Apply vendor security update for tar.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
⚠️ This week (7 days) — High risk, anonymous remote.

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
7.1 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-1284
Affected Products (1)
tar
References & Advisories (4)
Related CVEs
9.8
CVE-2026-145055
PraisonAI pip praisonai before 4.8.0, praisonaiagents and npm praisonai before 1.8.0, and praisonai-bot, prais
9.0
CVE-2026-126111
Missing secure processing in the XSLT transformer of the Velocity $xslttool view tool in dotCMS allows a back-
8.8
CVE-2026-77471
shell-chain is a PQVM-native, post-quantum blockchain. Prior to version 0.27.1, the finality vote aggregation
8.7
CVE-2026-137408
In Eclipse Yasson versions 1.0 through 1.0.11, 2.0 through 2.0.4, and 3.0 through 3.0.6, the deserializers for
0.0
CVE-2026-142427
Improper Validation of Specified Quantity in Input vulnerability in Drupal Direct Checkout by URL allows Manip
8.7
CVE-2026-142780
Simple Donation For Woo Lite before 1.0.1 contains a business logic vulnerability that allows unauthenticated
6.5
CVE-2026-129268
IBM Db2 for Linux, UNIX and Windows (includes DB2 Connect Server) 11.5.0 through 11.5.9, and 12.1.0 through 12