# tar (npm)

tar for JavaScript

- Latest: 8.1.2 (2026-12-03)
- Licence: BlueOak-1.0.0
- Downloads: 516777675 last month
- Advisories on the latest version: 0

- CVE-2026-140250 HIGH: node-tar: Symlink containment bypass via chained symlinks lets tar.x() create links that resolve outside the extraction directory (regression since 7.5.5) Fixed in 8.0.0.
- CVE-2026-140249 HIGH: node-tar: Symlink target escapes the extraction directory through an in-archive symlink chain Fixed in 8.0.0.
- CVE-2026-140248 HIGH: node-tar: Nested symlink target can escape node-tar extraction root Fixed in 8.0.0.
- CVE-2026-140241 HIGH: node-tar crashes the process with an uncaught exception on a 4-byte zstd magic header when the Node runtime lacks native zstd Fixed in 8.0.0.
- CVE-2026-140240 HIGH: node-tar: A small archive exhausts memory or CPU through path-reservation bookkeeping Fixed in 8.0.2.
- CVE-2026-140251 HIGH: node-tar async extraction deadlocks permanently when an entry's linkpath is a hierarchical relative of its own path Fixed in 8.0.0.
- CVE-2026-140231 HIGH: node-tar: Decompression within the ratio limit is buffered in memory without backpressure, and zero-size entries queue without bound Fixed in 8.0.0.
- CVE-2026-140239 HIGH: node-tar: Global PAX extended header injects attacker-controlled linkpath into tar.Parser entries, bypassing strict-mode validation Fixed in 8.0.0.
- CVE-2026-140247 HIGH: node-tar: Symlink linkpath escape check is lexical: '..' after an in-archive symlink creates symlinks outside the extraction directory Fixed in 8.0.0.
- CVE-2026-140246 HIGH: node-tar: SymbolicLink extraction escapes the extraction directory on non-Windows hosts via a backslash separator differential Fixed in 8.0.0.
- CVE-2026-140245 HIGH: node-tar: Symlink linkpath containment bypass via entry paths ending in '/.' Fixed in 8.0.0.
- CVE-2026-140244 HIGH: node-tar: Symlink containment bypass via nested symlink + '..' (lexical linkpath check) Fixed in 8.0.0.
- CVE-2026-140238 HIGH: node-tar: Newline injection in PAX extended-header records enables entry-attribute forgery (path overwrite → npm postinstall RCE on Windows) Fixed in 8.0.0.
- CVE-2026-140237 MODERATE: node-tar: ReadEntry pending PAX size reapplication permits metadata-body file smuggling  Fixed in 8.0.0.
- CVE-2026-140242 HIGH: node-tar: Non-finite PAX size (Infinity) bypasses validation, causing extraction entry loss and an uncaught exception when re-packing Fixed in 7.5.24.
- CVE-2026-140236 HIGH: node-tar: Archive framing differential from PAX size still being applied to GNU/PAX meta entries via ReadEntry and related size/precedence inconsistencies Fixed in 8.0.0.
- CVE-2026-140235 HIGH: node-tar parses PAX extended headers by newline-splitting instead of length-delimiting, causing record dropping and forged-field injection Fixed in 8.0.0.
- CVE-2026-140234 HIGH: node-tar: Incomplete NUL-byte truncation in ustar, GNU, and PAX names causes name differentials and async crashes Fixed in 8.0.0.
- CVE-2026-140230 HIGH: node-tar PathReservations.getDirs() quadratic memory amplification via unbounded symlink linkpath depth — uncatchable OOM process kill Fixed in 8.0.0.
- CVE-2026-140252 HIGH: node-tar UnpackSync never completes sync-stream extraction after any failing entry (PEND/UNPEND imbalance) Fixed in 8.0.0.
- CVE-2026-73566 HIGH: node-tar: Uncontrolled recursion in mapHas/filesFilter allows uncatchable stack-overflow DoS via crafted long-path tar with member selection Fixed in 7.5.21.
- CVE-2026-59873 CRITICAL: node-tar: Decompression/parse DoS via unlimited input Fixed in 7.5.19.
- CVE-2026-59874 HIGH: node-tar: Negative tar entry size causes infinite loop in archive replace Fixed in 7.5.18.
- CVE-2026-59875 MODERATE: node-tar: Uncaught Exception DoS via NUL byte in PAX path/linkpath records Fixed in 7.5.17.
- CVE-2026-59871 MODERATE: node-tar: Process crash via PAX numeric path type confusion Fixed in 7.5.18.
- CVE-2026-53655 MODERATE: node-tar applies PAX size override to intermediary GNU long-name/long-link headers, causing tar parser interpretation differential (file smuggling) Fixed in 7.5.16.
- CVE-2026-31802 HIGH: node-tar Symlink Path Traversal via Drive-Relative Linkpath Fixed in 7.5.11.
- CVE-2026-29786 HIGH: tar has Hardlink Path Traversal via Drive-Relative Linkpath Fixed in 7.5.10.
- CVE-2026-26960 HIGH: Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar Extraction Fixed in 7.5.8.
- CVE-2026-24842 HIGH: node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal Fixed in 7.5.7.
- CVE-2026-23950 HIGH: Race Condition in node-tar Path Reservations via Unicode Ligature Collisions on macOS APFS Fixed in 7.5.4.
- CVE-2026-23745 HIGH: node-tar is Vulnerable to Arbitrary File Overwrite and Symlink Poisoning via Insufficient Path Sanitization Fixed in 7.5.3.
- CVE-2025-64118 MODERATE: node-tar has a race condition leading to uninitialized memory exposure Fixed in 7.5.2.
- CVE-2024-28863 MODERATE: Denial of service while parsing a tar file due to lack of folders count validation Fixed in 6.2.1.
- CVE-2021-37713 HIGH: Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization Fixed in 4.4.18, 5.0.10, 6.1.9.
- CVE-2021-37701 HIGH: Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links Fixed in 4.4.16, 5.0.8, 6.1.7.
- CVE-2021-37712 HIGH: Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links Fixed in 4.4.18, 5.0.10, 6.1.9.
- CVE-2021-32804 HIGH: Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization Fixed in 4.4.14, 5.0.6, 6.1.1.
- CVE-2021-32803 HIGH: Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning Fixed in 4.4.15, 5.0.7, 6.1.2.
- CVE-2018-20834 HIGH: Arbitrary File Overwrite in tar Fixed in 4.4.2, 2.2.2.

Sources: npm, deps.dev (CC BY 4.0), OSV. Last checked 4 Dec 2026.
