CVE-2026-140237
### Summary A crafted tar archive containing consecutive PAX headers can make node-tar interpret a block inside a PAX metadata body as a real filesystem entry. Under default options, both `tar.list()` and `tar.extract()` expose the hidden entry, and extraction can truncate an existing file inside the destination directory. The issue remains in `[email protected]` and current commit `2a22bfc5d3a432a606d9da0e2d87ba634aa3b1cb`. It is a residual path around the PAX intermediary-entry fix released in `7.5.16`. ### Details The archive uses this sequence: ```text block 0: local PAX header, physical body size 10 block 1: PAX body containing "10 size=0\n", padded to 512 bytes block 2: second local PAX header, physical body size 512 block 3: second PAX metadata body containing a valid header for hidden.txt blocks 4-5: end-of-archive blocks ``` `Header.decode()` now checks the raw type flag and correctly refuses to apply pending PAX fields to the second PAX header. Its decoded size is therefore the physical value `512`. However, [`ReadEntry` ](https://github.com/isaacs/node-tar/blob/2a22bfc5d3a432a606d9da0e2d87ba634aa3b1cb/src/read-entry.ts#L45-L50) size initializes its body counters from that correct header, then [`ReadEntry.#slurp()`](https://github.com/isaacs/node-tar/blob/2a22bfc5d3a432a606d9da0e2d87ba634aa3b1cb/src/read-entry.ts#L135-L149) copies the pending PAX object onto the entry without an entry-type guard. The second PAX entry consequently has inconsistent state: ```text entry.meta = true entry.remain = 512 entry.blockRemain = 512 entry.size = 0 ``` [`Parser` selects the metadata state using the overwritten public `entry.size`](https://github.com/isaacs/node-tar/blob/2a22bfc5d3a432a606d9da0e2d87ba634aa3b1cb/src/parse.ts#L240-L250). When it is zero, neither the `ignore` nor `meta` branch changes the parser state. The next 512-byte block is therefore processed as a tar header instead of being consumed as the second PAX entry's metadata body. The cl
Properties
- Severity
- medium
- Summary
- node-tar: ReadEntry pending PAX size reapplication permits metadata-body file smuggling
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Cvss severity
- MEDIUM
- Cvss score
- 6.9
- Retrieved at
- 2026-12-02T06:39:20+00:00
- Ghsa published
- 2026-12-02T01:33:14Z
- Source url
- https://github.com/advisories/GHSA-p96f-8xj2-g85p
- Ghsa updated
- 2026-12-02T01:33:15Z
- Ghsa id
- GHSA-p96f-8xj2-g85p
- Last source
- GitHub Advisory Database
- Score
- 6.9
- Cvss version
- 4.0
- Cve id
- CVE-2026-140237
- Cvss vector
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- First seen by Signal
- 2026-12-01T18:35:21+00:00
- Name
- CVE-2026-140237
- Is ghsa only
- false
- Vector
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- Published at
- 2026-12-01T18:17:27.360
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph