CVE Professor
/
All CVEs
CVE-2026-140245

CVE-2026-140245 — Tar — CWE-22

HIGH CVSS 7.2 ⚡ EPSS 1.0% GitHub

### Summary A relative symlink linkpath is validated against path.posix.dirname(entry.path) but created at path.resolve(cwd, entry.path). An entry named 'x/.' shifts the check's base one level shallower, so one '..' is absorbed by the check and the link still escapes the extraction directory, with default options and no warning. Regression in 7.5.5-7.5.22 (introduced by the #450 fix). ### Details ### Mechanism `[STRIPABSOLUTEPATH]` resolves a relative `linkpath` against `path.posix.dirname(entry.path)` (`src/unpack.ts:286`), but the link is created at `path.resolve(cwd, entry.path)` (`src/unpack.ts:359`). For an entry name ending in `/.`, `dirname` returns a base one level shallower than the directory the link is actually created in. The check therefore normalises `x/../outside/secret.txt` to `outside/secret.txt`, which passes `startsWith('../')` at `:291`, while the kernel resolves the link from `cwd` and lands outside the destination. ### Affected `>= 7.5.5, <= 7.5.22`. The regression was introduced by `e9a1ddb` (the #450 relative-linkpath fix). `7.5.4` rejects the entry with `linkpath contains '..'`. ### Fix ```ts const base = path.posix.dirname(normalize(entry.path)) ``` Using the same base the filesystem will use makes the check and the write agree. Verified against a 1,464-pair property corpus: 300 buggy pairs rejected, 0 legitimate pairs rejected, 0 new accepts; 677 existing tests pass. ### Notes Distinct from GHSA-9ppj-qmqm-q256: that finding is a maliciou

### Summary A relative symlink linkpath is validated against path.posix.dirname(entry.path) but created at path.resolve(cwd, entry.path). An entry named 'x/.' shifts the check's base one level shallower, so one '..' is absorbed by the check and the link still escapes the extraction directory, with default options and no warning. Regression in 7.5.5-7.5.22 (introduced by the #450 fix). ### Details ### Mechanism `[STRIPABSOLUTEPATH]` resolves a relative `linkpath` against `path.posix.dirname(entry.path)` (`src/unpack.ts:286`), but the link is created at `path.resolve(cwd, entry.path)` (`src/unpack.ts:359`). For an entry name ending in `/.`, `dirname` returns a base one level shallower than the directory the link is actually created in. The check therefore normalises `x/../outside/secret.txt` to `outside/secret.txt`, which passes `startsWith('../')` at `:291`, while the kernel resolves the link from `cwd` and lands outside the destination. ### Affected `>= 7.5.5, <= 7.5.22`. The regression was introduced by `e9a1ddb` (the #450 relative-linkpath fix). `7.5.4` rejects the entry with `linkpath contains '..'`. ### Fix ```ts const base = path.posix.dirname(normalize(entry.path)) ``` Using the same base the filesystem will use makes the check and the write agree. Verified against a 1,464-pair property corpus: 300 buggy pairs rejected, 0 legitimate pairs rejected, 0 new accepts; 677 existing tests pass. ### Notes Distinct from GHSA-9ppj-qmqm-q256: that finding is a maliciou

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/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. Low VC:L
Vuln. Integrity High VI:H
Vuln. Avail. Low VA:L
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
EPSS — Exploit Prediction Scoring System
1.0%
30-day probability
In the 64. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

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

🎯 WHAT IS THIS VULNERABILITY?
Path Traversal / LFI
Summary: ### Summary

A relative symlink linkpath is validated against path.posix.dirname(entry.path) but created at path.resolve(cwd, entry.path). An entry named 'x/.' shifts the check's base one level shallower, so one '..' is absorbed by the check and the link still escapes the extraction directory, with default options and no warning. Regression in 7.5.5-7.5.22 (introduced by the #450 fix).
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); data can be modified or deleted; reduced availability or partial DoS (A:L).

🛡️ REMEDIATION
→ Apply vendor security update for tar.
→ Use realpath() canonicalization, implement allowlists.
→ 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.2 / 10 · CVSS HIGH
Weakness Types (CWE)
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
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.4
CVE-2026-129109
Calico installations managed by the Tigera Operator install a FlexVolume driver (nodeagent~uds/uds) on every L
9.4
CVE-2026-64883
Path traversal in the WebDAV interface (DotWebdavHelper and the WebDAV temporary-file COPY and MOVE handling)