Actively exploited Attackers exploit Acronis Backup plugin for cPanel; users of version 1.9.4 are told to downgrade CVSS 7.5 · Published Dec 4, 05:40 UTC What to do now ›

TechNews

node-tar 8 fixes 20 archive flaws, including symlink escapes, but needs Node.js 22

Twenty advisories for node-tar were published on Dec 1 and 2, covering symbolic links that escape the extraction folder, forged archive headers and crashes. Version 8.0.2 or later fixes all of them, but tar 8 requires Node.js 22 or newer.

7.2 HighPatch available

News graphic with the label 'Developer security', the title 'node-tar' and the line '18 advisories, fixed in 8.0.2, Node.js 22+', above an illustration of an opened archive box inside a dashed folder outline, with a chain link and a red arrow leading to a red file outside the folder
Illustration: AI Security Times
CVE
CVE-2026-140238CVE-2026-140246CVE-2026-140247
+17 moreCVE-2026-140244CVE-2026-140245CVE-2026-140248CVE-2026-140249CVE-2026-140250CVE-2026-140239CVE-2026-140235CVE-2026-140236CVE-2026-140237CVE-2026-140234CVE-2026-140240CVE-2026-140241CVE-2026-140242CVE-2026-140251CVE-2026-140252CVE-2026-140230CVE-2026-140231
Severity
7.2 High
CVSS 7.2, High
Status
Patch available
Product
node-tar (the tar package on npm)

Am I affected?

Check your version
Affected
versions before 8.0.0 for 19 of the flaws, and before 8.0.2 for one memory-exhaustion flaw
Fixed in
8.0.2 and later (latest 8.0.5). On the 7.x line, 7.5.24 fixes only one of the 20

What to do now:

  1. Update tar to 8.0.2 or later. Run npm ls tar to find every copy: it often arrives as a dependency of another package.
  2. tar 8 requires Node.js 22 or newer. If you still run an older Node.js, plan that upgrade now: 7.x has no fix for 19 of the 20 flaws.
  3. Until you can update, do not use node-tar to extract archives from untrusted sources, or extract them in an isolated container.

Twenty security advisories for node-tar, the library published on npm as tar, were released on GitHub on Dec 1 and 2. Nineteen are rated high and one medium, with CVSS 4.0 scores from 6.9 to 7.2. npm counted about 113.5 million downloads of the package in the week of Nov 24 to Nov 30.

The fixes are already out: version 8.0.0 was released on Nov 28, followed a few hours later by 8.0.2, which fixes the last of the 20. But tar 8 requires Node.js 22 or newer, and only one of the flaws was fixed on the older 7.x line.

What the flaws do

node-tar’s documentation promises that “Link and SymbolicLink entries are not allowed to target locations outside of the extraction folder”. Seven of the advisories describe ways a crafted archive breaks that promise. One uses a “..” segment that follows a symbolic link created earlier by the same archive. Another uses a backslash, which the containment check and the code that creates the link read differently on hosts other than Windows. That report confirms reading /etc/passwd with default extraction options.

Several more advisories concern PAX extended headers, the records in a tar file that carry long file names and other attributes. In the most serious case, CVE-2026-140238, a newline inside a header value lets an attacker forge an entry’s attributes, including its path, so the file is written somewhere the archive did not declare. The reporter demonstrated it end to end: “overwriting package.json inside an installed npm package and executing an injected postinstall on a real Windows machine”.

The rest are denial-of-service bugs. They include a small archive that exhausts memory or CPU, a 4-byte zstd header that crashes the process when Node.js lacks native zstd support, and extractions that hang forever. The two advisories published on the evening of Dec 2 add to that list. In one, CVE-2026-140230, a symbolic link with a very deeply nested target makes node-tar build an enormous list of paths: “A 181-byte gzip archive is sufficient to instantly kill any Node.js process attempting extraction.” The other, CVE-2026-140231, lets decompressed data pile up in memory without limit.

The Node.js 22 catch

Version Released Requires Fixes
7.5.24 Nov 26 Node.js 18 or newer 1 of the 20 flaws (CVE-2026-140242)
8.0.0 Nov 28 Node.js 22 or newer 18 flaws; 8.x is not affected by CVE-2026-140242
8.0.2 Nov 28 Node.js 22 or newer The last one, CVE-2026-140240

The current release is 8.0.5, published on Dec 2. Projects that still run Node.js 18 or 20 cannot simply bump the dependency: they need a newer Node.js first.

What to do

Find every copy with npm ls tar, then update to 8.0.2 or later. The risk is highest where a program extracts archives it did not create, such as uploaded files, downloaded packages and build artifacts. If you cannot move to Node.js 22 yet, do not extract untrusted archives with node-tar until you can.

Updated Dec 3 to add two advisories published on the evening of Dec 2, CVE-2026-140230 and CVE-2026-140231. Both are fixed in 8.0.0, so the advice is unchanged.

Sources

  1. node-tar security advisoriesProject
  2. GHSA-mpg7-vg3p-wc3m: Newline injection in PAX extended-header records enables entry-attribute forgeryAdvisory
  3. GHSA-gvrf-jx37-rjv5: Symlink linkpath escape check is lexicalAdvisory
  4. GHSA-hqgx-p3r3-2cfg: SymbolicLink extraction escapes the extraction directory via a backslashAdvisory
  5. tar on npmnpm
  6. npm download counts for tarnpm

AI Security Times

Newsroom

Stories signed AI Security Times are researched and drafted with AI assistance, checked against their primary sources and approved by our editor before they are published. Every news story and analysis lists its sources at the end. Read how we use AI and our editorial standards.

More from AI Security Times ›

Spotted a mistake? Report an error

Related coverage

More in Tech ›