Packages
node-tar 8.0.5 & CVE-2026-140242: Clearing 18 GitHub Advisories and the Node.js 22 Upgrade Floor
The npm tar package (node-tar) reached 8.0.5 on December 2, 2026, following 18 GitHub Security Advisories and CVE-2026-140242 (CVSS 4.0 7.1 High) disclosed across late November and early December. Because tar 8.x introduces a Web Streams API rewrite and a strict Node.js 22+ floor, teams on older runtimes face a hard upgrade decision between 7.5.24 and 8.0.5.
9 min read
node-tar 8.0.5 & CVE-2026-140242: Clearing 18 GitHub Advisories and the Node.js 22 Upgrade Floor
Executive Summary
- Featured Package & Ecosystem:
tar(isaacs/node-taron GitHub, JavaScript / TypeScript, npm registry,BlueOak-1.0.0License,0runtime dependencies). - Latest Release & Verification Date:
tar@8.0.5was published to npm on December 2, 2026 (00:05 UTC), following8.0.0and8.0.2on November 28, 2026, and7.5.24on November 26, 2026 (npmtar, P.K. Sharma Briefing). - Security & Advisory Context: Between December 1 and December 2, 2026, GitHub's global advisory database published 18 reviewed advisories for
tar—out of 33 project-published advisories dated from November 28, 2026—includingCVE-2026-140242(GHSA-ph3c-p786-j4rp, CVSS 4.0 7.1 High, CWE-1284) (OpenCVE, Brandefense). No active in-the-wild exploitation is confirmed as of December 2, 2026, and the CISA KEV catalog snapshot from November 30, 2026 does not listCVE-2026-140242(Brandefense). - Primary Upgrade Takeaway: Upgrading to
tar@8.0.2ortar@8.0.5clears all 18 GitHub advisories, but8.xis a breaking major release requiring Node.js 22 or later and adopting a Promises + Web Streams API (GitHubisaacs/node-tar, P.K. Sharma Briefing). Teams pinned to Node.js 18 or 20 on7.xonly have a7.5.24backport forCVE-2026-140242—not the full 18-advisory sweep.
Adoption Telemetry & Version Changelog
tar (node-tar) is the foundational archive engine behind npm's own tarball packing and unpacking, monorepo tooling, and Vite's dependency pre-bundling pipelines (PkgPulse). Because it sits deep in build toolchains and artifact processors, major version bumps ripple across thousands of downstream packages and CI/CD runners.
| Telemetry Metric | Verified Value | Source & Verification Date |
|---|---|---|
npm Weekly Downloads (tar) |
115,381,961 / week |
npm tar (verified Dec 2, 2026) |
| npm Dependents | 8,183 packages |
npm tar (verified Dec 2, 2026) |
| Latest Version | 8.0.5 (published Dec 2, 2026) |
npm tar, P.K. Sharma Briefing |
| Runtime Dependencies | 0 runtime dependencies |
GitHub isaacs/node-tar (verified Dec 3, 2026) |
| License | BlueOak-1.0.0 |
npm tar (verified Dec 2, 2026) |
Minimum Node.js (8.x) |
Node.js 22 or later (plus Bun, Deno, Cloudflare, browsers via tar/core) |
GitHub isaacs/node-tar |
Release & Advisory Timeline (Nov 26 – Dec 2, 2026)
- November 26, 2026 (
v7.5.24, 17:40 UTC): Maintainer Isaac Z. Schlueter tagged and published7.5.24, patching the non-finite PAX size validation bug (CVE-2026-140242) on the7.xline (OpenCVE, P.K. Sharma Briefing). - November 28, 2026 (
v8.0.0at 03:49 UTC &v8.0.2at 06:01 UTC): The8.0major rewrite shipped with a Node.js 22+enginesfloor, Promises/Web Streams/Uint8ArrayAPIs, dualtarandtar/coreentry points, and brotli/zstd compression alongside gzip (GitHubisaacs/node-tar, P.K. Sharma Briefing). - December 1–2, 2026 (18 GitHub Advisories &
v8.0.5): NVD publishedCVE-2026-140242on December 1 (17:41 UTC), and between December 1 (19:27 UTC) and December 2 (01:45 UTC), GitHub's advisory database published 18 reviewed entries fortar—16 naming8.0.0as the first patched version, 1 naming8.0.2, and 1 (GHSA-ph3c-p786-j4rp) naming7.5.24. At 00:05 UTC on December 2,tar@8.0.5shipped with additional parser and extraction fixes (P.K. Sharma Briefing, OpenCVE).
Security Patches, Breaking Changes & Internals
Root Cause of CVE-2026-140242 and Advisory Scope
CVE-2026-140242 (GHSA-ph3c-p786-j4rp, CVSS 4.0 7.1 High, CWE-1284) affects tar versions 7.0.0 up to (excluding) 7.5.24 (OpenCVE, Rapid7). When an untrusted archive supplies a non-finite PAX extended header size—specifically 17 size=Infinity\n—the size check bypasses numeric bounds validation. According to the maintainer's disclosure and Brandefense's analysis, this triggers two distinct failure modes:
- Extraction / Listing Entry Loss: Subsequent archive entries after the malformed PAX header can be silently dropped during extraction or listing, creating integrity gaps in automated unpackers and build artifact pipelines (Brandefense).
- Re-Packing Crash (High Availability Impact): Services that ingest and re-pack untrusted tarballs suffer an uncaught process exception, explaining the CVSS 4.0 High availability rating (
AV:N/VA:H) (OpenCVE, Brandefense).
Beyond CVE-2026-140242, the discrepancy between 7.5.24 and 8.0.2+ matters for automated npm audit and SCA pipelines: 17 of the 18 reviewed GitHub advisories list 8.0.0 or 8.0.2 as the first patched version, and no fix is listed for 6.x or older in the advisory database (P.K. Sharma Briefing). Furthermore, the maintainer's own advisory list totals 33 entries dated from November 28, meaning additional advisories may still propagate into downstream SCA feeds after December 2.
Patch Coverage Matrix Across Major Lines
tar Release Line |
CVE-2026-140242 Fixed? |
Remaining 17 GHSA Advisories | Node.js Requirement | Upgrade Complexity |
|---|---|---|---|---|
6.x and older |
Not listed in advisory DB | No patched version listed | Legacy Node.js | High (must migrate to 7.5.24 or 8.x) |
7.0.0 – 7.5.23 |
Vulnerable | Vulnerable | Node.js < 22 supported |
Patch to 7.5.24 or jump to 8.x |
7.5.24 (Nov 26, 2026) |
Yes | Not cleared in GitHub DB | Node.js < 22 supported |
Drop-in 7.x patch |
8.0.0 – 8.0.1 |
Yes | 16 cleared; 1 requires 8.0.2+ |
Node.js 22+ | Breaking major API rewrite |
8.0.2 – 8.0.5 (Dec 2, 2026) |
Yes | All 18 GitHub entries cleared | Node.js 22+ | Breaking major API rewrite |
Breaking Changes in tar@8.x
Upgrading from 7.x (or 6.x) to 8.0.5 is not a drop-in patch and requires code and runtime verification:
- Node.js 22+ Floor:
tar@8.xenforces Node.js22or later in itsenginesfield (while also supporting Bun, Deno, Cloudflare Workers, and browsers viatar/core) (GitHubisaacs/node-tar, P.K. Sharma Briefing). - Promises, Web Streams &
Uint8ArrayAPI:create()andextract()now use async Promises and return standard WebReadableStreaminstances when nofileoption is passed, replacing legacy Node-stream-only patterns (GitHubisaacs/node-tar). - Dual Entry Points (
tarvs.tar/core): The defaulttarentry point usesnode:fsandnode:zlib(supporting gzip, brotli, and zstd), whereastar/coreimports zeronode:built-ins so it runs in browsers and edge workers with a customfsoption (GitHubisaacs/node-tar). - Target Directory Pre-Creation: In
8.x, the destination directory forextract({ cwd })must already exist—callers should explicitly create it withmkdir(..., { recursive: true })before extracting (GitHubisaacs/node-tar). - Dual ESM and CommonJS Builds: Both
importandrequire()are supported in8.x, easing adoption in mixed module codebases once the Node.js 22+ requirement is satisfied (GitHubisaacs/node-tar).
Updated Usage & Defensive Extraction Snippet (tar@8.0.5)
The safe ESM snippet below shows how to pack an archive as a Web ReadableStream and extract an untrusted archive into a pre-created directory under tar@8.0.5:
import { createWriteStream } from "node:fs";
import { mkdir } from "node:fs/promises";
import { Writable } from "node:stream";
import { create, extract } from "tar";
// 1. Stream a gzipped tarball using Web Streams (tar 8.x API)
const archiveStream = create({ gzip: true }, ["src", "package.json"]);
await archiveStream.pipeTo(Writable.toWeb(createWriteStream("release.tgz")));
// 2. Safely extract into an existing directory
await mkdir("out", { recursive: true });
await extract({
file: "release.tgz",
cwd: "out",
// Retain node-tar's default path sanitization; avoid preservePaths: true on untrusted inputs
});
Ecosystem Comparison & Upgrade Checklist
Node.js Tar Archive Packages Compared
| Package & Version | Weekly npm Downloads | License & Deps | Runtime Floor & API Style | Security & Use-Case Fit |
|---|---|---|---|---|
tar (8.0.5) |
115.38M (npm) |
BlueOak-1.0.0 / 0 deps |
Node 22+, Bun, Deno, browsers (tar/core); Promises + Web Streams |
Clears all 18 Dec 2026 GitHub advisories; native gzip/brotli/zstd; full FS sanitization |
tar-fs (3.1.4) |
78.40M–81.95M (npm, Snyk) |
MIT / wraps tar-stream |
Node.js FS bindings over tar-stream callbacks/streams |
Healthy cadence (383 GitHub stars); pairs with gunzip-maybe for .tar.gz |
tar-stream (3.3.0) |
~15M (PkgPulse) |
MIT / 4 deps |
Node.js Transform streams (pack / extract); no FS writes |
Best for pure in-memory or streaming archive pipelines without disk I/O |
Safe Upgrade & Triage Checklist
- Inventory All Direct and Transitive
tarVersions: Runnpm ls tar(or inspectpnpm-lock.yaml/yarn.lock) to separate6.x,7.x, and8.xconsumers, prioritizing services that extract or re-pack untrusted archives (Brandefense). - Verify Node.js 22+ Readiness Before Bumping to
8.0.5: Confirm CI runners, Docker base images, and production containers run Node.js22or later (or an alternative runtime supportingnode:built-ins /tar/core) before upgrading across the7.x -> 8.xboundary (GitHubisaacs/node-tar). - Update
extract()Callers for8.xBreaking Changes: Ensure destination directories exist viamkdir(dest, { recursive: true })and migrate stream consumers toReadableStream/ Promise signatures (GitHubisaacs/node-tar). - Apply
7.5.24Only as a Narrow Bridge on Node < 22: If an application cannot immediately move to Node.js 22+, upgrade7.xto7.5.24to closeCVE-2026-140242, while isolating untrusted archive processing and scheduling the Node 22 +8.0.5migration (OpenCVE, P.K. Sharma Briefing). - Re-Audit Transitive CLI & Build Dependencies: Tools like npm, Vite, and monorepo bundlers pull
tartransitively; update lockfiles and verifynpm auditafter upstream maintainers ship8.0.2+bumps (PkgPulse, P.K. Sharma Briefing).
FAQ
1. Does tar@7.5.24 fix all 18 GitHub advisories published in December 2026?
No. According to GitHub's global advisory database as of December 2, 2026, 7.5.24 is listed as the fix for GHSA-ph3c-p786-j4rp (CVE-2026-140242), while 17 of the 18 reviewed advisories list 8.0.0 or 8.0.2 as the first patched version.
2. Why does node-tar 8.0.5 require Node.js 22 or later?
The 8.0 rewrite adopts modern Web Streams, Promises, Uint8Array, and built-in node:zlib compression (including gzip, brotli, and zstd) while dropping legacy polyfills and runtime dependencies, setting Node.js 22 as the minimum engines floor.
3. Is CVE-2026-140242 actively exploited in the wild?
As of December 2, 2026, no active in-the-wild exploitation has been confirmed, and the CISA Known Exploited Vulnerabilities (KEV) catalog snapshot from November 30, 2026 does not list CVE-2026-140242. However, the maintainer demonstrated both dropped archive entries and uncaught re-packing crashes.
4. What is the difference between tar and tar/core in 8.0.5?
tar is the server-side entry point built on node:fs and node:zlib for Node.js, Bun, Deno, and Cloudflare Workers. tar/core uses zero node: built-ins so browsers and edge workers can process tar streams using Web Streams and a custom fs adapter.
5. What should teams on tar@6.x or older do?
GitHub's advisory database lists no patched 6.x release for the December 2026 advisories. Teams still on 6.x should audit whether untrusted archives reach tar and plan a direct migration to Node.js 22+ with tar@8.0.5 (or evaluate tar-stream / tar-fs if Node 22 is blocked).
Sources
- npm Registry Package Page — tar (
8.0.5) on npm (https://www.npmjs.com/package/tar), published December 2, 2026. - Official GitHub Repository — isaacs/node-tar (
https://github.com/isaacs/node-tar), accessed December 3, 2026. - OpenCVE Vulnerability Record — CVE-2026-140242 (
GHSA-ph3c-p786-j4rp) (https://app.opencve.io/cve/CVE-2026-140242), published December 1, 2026, updated December 2, 2026. - P.K. Sharma Advisory Briefing — GitHub lists 18 node-tar flaws; 8.0.2 clears all, tar 8 needs Node 22 (
https://www.pk-sharma.com/briefing/node-tar-18-github-advisories-8-0-2-or-later-clears-all-tar-8-needs-node-22), published December 2, 2026. - Brandefense Vulnerability Analysis — CVE-2026-140242: node-tar PAX Size Flaw, Fix Status (
https://brandefense.io/knowledge-hub/vulnerabilities/cve-2026-140242/), published December 2, 2026. - npm & Snyk Telemetry (
tar-fs&tar-stream) — tar-fs (3.1.4) (https://www.npmjs.com/package/tar-fs,https://security.snyk.io/package/npm/tar-fs) and tar-stream (3.3.0) (https://www.npmjs.com/package/tar-stream), accessed December 3, 2026.