Four node-tar vulnerabilities disclosed in late November 2026 let a crafted tarball exhaust memory, survive name truncation with a NUL byte intact, forge PAX header fields, or frame an archive differently from the scanner that checked it first. All four affect npm tar versions before 8.0.0, and the fix landed in a breaking major release, so the npm tar 8.0.5 upgrade needs a plan rather than a blind version bump. This guide walks through each flaw, shows how to find every tar copy in your lockfiles and runner images, and sets out the controls that hold the line while older copies remain in the tree.
Node-tar vulnerabilities at a glance: four flaws, one fix line
Four node-tar vulnerabilities, CVE-2026-140229, CVE-2026-140234, CVE-2026-140235 and CVE-2026-140236, affect npm tar before 8.0.0 and carry CVSS 4.0 scores of 7.1 to 7.2. The GitHub advisories landed on 28 November 2026, the CVE records on 1 December 2026, and tar 8.0.0 carries the fixes.
The node-tar vulnerabilities in this guide sit in one small, widely shared piece of code: the parser that reads tar archives in Node.js. The npm package is named tar, the project is node-tar, and it shows up in package installers, build tools, artifact extractors and backup jobs. Ostorlab, citing npm figures, put weekly downloads near 113.5 million in the week of 24 November 2026. Treat that number as a scale signal rather than an exposure count. Your exposure depends on whether code you run hands attacker-influenced archives to this parser.
| CVE | GHSA | CVSS 4.0 | Affected tar | Fixed in | Core problem |
|---|---|---|---|---|---|
| CVE-2026-140229 | GHSA-9239-v992-p74f | 7.1 High | before 8.0.0 | 8.0.0 | Decompression ratio checked after allocation |
| CVE-2026-140234 | GHSA-wpwg-r92p-fjjh | 7.1 High | before 8.0.0 | 8.0.0 | NUL byte survives name truncation |
| CVE-2026-140235 | GHSA-rgjp-p5j7-w36x | 7.2 High | 7.5.0 to before 8.0.0 | 8.0.0 | PAX records split on newlines, fields forged |
| CVE-2026-140236 | GHSA-qv2w-fc3h-pm27 | 7.2 High | before 8.0.0 | 8.0.0 | PAX size frames meta entries, readers disagree |
Scores in the table come from the GitHub CNA records carried by the CVE and NVD databases. Two of the four flaws are denial-of-service bugs. Two are interpretation bugs, where node-tar and other tar readers disagree about what an archive contains. That second group matters for security pipelines, because a scanner and an extractor that read an archive differently leave a gap an attacker can aim at.
Dates need care. The repository advisories were published on 28 November 2026 and the CVE records on 1 December 2026. Some vendor archive pages, including the Kodem Security page for CVE-2026-140229, carry a 5 December 2026 date. That later date is a page date, not the disclosure date. The tar 8.0.0 release that fixes these four flaws also shipped on 28 November 2026, and the current 8.x line reached 8.0.5 on 2 December 2026.
One more scope point. These four CVEs are part of a larger batch of node-tar advisories fixed across the 8.x line. This guide stays with the four named flaws, but the remediation advice points at the latest 8.x release, because stopping at 8.0.0 leaves later advisories open. If your scanner reports sibling IDs such as CVE-2026-140238 or CVE-2026-140240, the same upgrade path applies, with a version floor of 8.0.2 or later.
No in-the-wild exploitation was reported for the batch as of 2 December 2026, and the CVEs were not listed in the CISA Known Exploited Vulnerabilities catalog at that point. Public proof-of-concept material does exist inside the advisories. That combination argues for prompt, scheduled patching this week, with extra urgency for any service that extracts archives from untrusted senders.
The 970+ Incident Handbook & K8s Runbooks are exclusive to subscribers — unlock for FREE
Get battle-tested production runbooks, AWS architecture blueprints, and zero-downtime CI/CD post-mortems sent directly to your inbox. 100% free, no spam.
CVE-2026-140229: the decompression guard that checks too late
CVE-2026-140229 lets a small compressed archive exhaust memory because node-tar evaluates maxDecompressionRatio after Node zlib has already materialized the inflated chunk. The advisory demonstrates a 65,608 byte zstd archive driving a 512 MB container to an OOM kill at default settings.
CVE-2026-140229 is the clearest of the four node-tar vulnerabilities to explain to an on-call engineer. node-tar has a maxDecompressionRatio guard meant to stop decompression bombs. The guard runs from the decompressor data event. By the time that event fires, Node zlib has finished inflating the current input chunk and the output is already resident in memory. The check measures an allocation that already happened. It does not bound the allocation before it happens.
Two details make the gap wide. First, compressed bytes are credited per write() call, so the effective budget for a chunk is the input size multiplied by 1000 before the ratio is evaluated even once. File-reading helpers in tar write in large chunks, which front-loads that budget. Second, the single ratio constant of 1000 fits DEFLATE, whose ceiling sits near 1032 to 1. The advisory notes zstd reaching roughly 32,700 to 1 and brotli far higher, so on those codecs the expansion completes inside one chunk at almost any write size. zstd needs no opt-in from the caller. It is detected from its magic bytes by default.
The advisory proof of concept builds a 65,608 byte zstd archive whose entry header declares a 2 GiB size, feeds it to tar.t() at default options inside a container limited to 512 MB, and records an OOM kill with exit code 137. No ratio error appears before the kill. Under a memory limit the outcome is a fast process death. Without a limit, the outcome is host-wide memory pressure that can starve neighbouring workloads on a shared runner.
A third path in the same advisory needs no decompression. Both parse loops stop at the tar end-of-archive marker, but the buffering path keeps appending later input chunks with nothing draining them, and write() never signals the producer to slow down. A service that streams untrusted input into the parser can grow memory after the logical end of the archive.
Keep the impact claim narrow. This is an availability flaw, scored 7.1 with high availability impact and no confidentiality or integrity impact in the CNA vector. It does not read files or run code. The risk is a cheap, unauthenticated way to kill or stall any process that lists or extracts supplied archives: registry mirrors, artifact services, upload processors, cache restore steps and CI jobs that unpack downloaded tarballs. Listing is enough. Code that only calls tar.t() to preview an archive still runs the decompression path.
CVE-2026-140234: a NUL byte that survives name truncation
CVE-2026-140234 comes from a name truncation regex whose dot does not match line terminators, so a NUL byte followed by a newline, carriage return, U+2028 or U+2029 survives in ustar, GNU and PAX names. Async extraction then throws at the filesystem call and can crash the process.
CVE-2026-140234 is a small regex bug with two distinct outcomes. node-tar cuts entry names at the first NUL byte with a replace pattern. Without the s flag, the dot in that pattern does not match line terminators. When a newline, carriage return, U+2028 or U+2029 follows the NUL, the match stops early, only part of the tail is removed, and the NUL stays in the name. The same pattern serves ustar names, GNU long-name and long-link data, and PAX values.
The first outcome is a crash. During async extraction, a name that still contains a NUL reaches the filesystem layer, which throws. A process that does not catch that throw dies mid-extraction. For a long-running service that unpacks uploads, one crafted archive can take down the worker. For a CI job, the same archive fails the build step and can leave a half-written workspace behind.
The second outcome is a name differential, and it needs the strip option. With strip enabled, the surviving characters after the NUL make node-tar compute a different path from the one other tar tools compute for the same bytes. Path-based allowlists, deny lists and scanner verdicts keyed on entry names can then be checked against one name while extraction writes another. The advisory frames this as a differential, not a direct path escape, and the draft keeps that framing. The danger appears when a second system trusts its own reading of the name.
Why did this survive earlier fixes? The advisory notes the regex arrived with an earlier PAX NUL fix in 7.5.17, written on the assumption that PAX lines cannot contain line terminators. That assumption fails for crafted input, and the pattern was reused for ustar and GNU names. The 8.0.0 release notes describe the corrected rule in plain terms: a NUL ends a name.
For detection, this flaw hides well. Version checks find it, but log review rarely does, because the failure looks like a generic filesystem throw. If your extraction workers log uncaught exceptions with archive IDs attached, search those logs for NUL-related filesystem errors after 28 November 2026, then check which tar version handled each hit.
CVE-2026-140235: PAX records split on newlines, fields forged
CVE-2026-140235 is a PAX parsing flaw: node-tar split length-delimited PAX records on newlines, so a newline inside a value dropped the true record and a crafted fragment could forge path, size, linkpath, mode or ownership fields that other tar readers never apply.
CVE-2026-140235 is the integrity centre of this set of node-tar vulnerabilities. POSIX PAX extended headers store records in a length-delimited form: a decimal length, a space, a key, an equals sign, a value, and a closing newline. The length counts the whole record, including any newline that sits inside the value. A compliant reader walks the buffer by length. node-tar instead split the header body on every newline and validated each resulting line on its own.
That split breaks in two directions. A record whose value contains a newline, which happens legitimately when an archived filename contains a newline, fails the per-line length check and gets dropped. The entry falls back to its truncated 100-byte header name. Worse, a fragment after the embedded newline that happens to form a valid length-prefixed key and value line is accepted as a real extended-header field. The advisory lists path, size, linkpath, mode, uid, gid and mtime as forgeable fields.
The advisory validation compared node-tar 7.5.22 against GNU tar 1.35 and Python 3.13 tarfile. GNU tar and Python read the true long names with correct sizes. node-tar dropped the real records, applied a forged path, reported a forged size of 0 for a 9 byte file, and attached a forged linkpath to a plain file entry. On extraction, node-tar materialized the forged filename on disk. The 8.0.0 fix reads PAX records by length and requires decimal safe integers.
Hold the impact line where the advisory puts it. In default extraction mode, a forged path stays inside the extraction root because path sanitisation still applies. The forged field still defeats name-based and attribute-based inspection, because the scanner and the extractor disagree. With preservePaths enabled, the forged path may be absolute or contain a parent-directory component, which raises the stakes sharply. Any service that enables preservePaths on untrusted archives should treat this CVE as a same-day fix.
There is a quieter operational cost. node-tar could not round-trip archives it wrote itself when filenames contained newlines. Teams that archive user-named files with tar 7.x may already have silent name damage in stored backups. After upgrading, test a restore of your oldest archive with long or unusual filenames, and compare listings between node-tar and GNU tar.
CVE-2026-140236: when the scanner and extractor frame different archives
CVE-2026-140236 lets PAX size values frame GNU and PAX meta entries in node-tar, so the parser can see a different entry set from GNU tar, bsdtar or Python tarfile. A file a pre-extraction check never saw can then be extracted, and the meta-entry memory limit can be exceeded.
CVE-2026-140236 is an interpretation conflict, and it is the flaw most likely to surprise teams that already scan archives before extraction. An earlier fix stopped one code path, Header.decode, from applying extended-header values to non-file blocks. A second path, ReadEntry, still copies the PAX size value onto meta entries such as GNU long-name, long-link and PAX header blocks. The parser then uses that copied size to decide how many bytes belong to the meta entry body. Frame the body with the wrong size and every following entry boundary shifts.
The advisory groups four related inconsistencies. The meta-entry size application works under default options across extract, list, Parser and Unpack paths. The maxMetaEntrySize guard is checked against the PAX-overridden entry size while the buffer accumulates header.size bytes, so the memory limit can be exceeded. Global header values can override local ones through ReadEntry, reversing PAX precedence. A fourth variant affects re-packing and needs the non-default archive re-pack feature.
The security consequence is a scanner and extractor disagreement. Picture a pipeline that lists an archive with one tar implementation, checks names and sizes against policy, then extracts with node-tar. If node-tar frames the archive differently, the extracted set can include a file the policy check never saw. The check passed honestly. The extraction also ran honestly. The gap lives between two readings of the same bytes, which is why this class of bug carries the interpretation conflict weakness label, CWE-436.
This framing differential compounds CVE-2026-140235. A forged PAX size from the newline split feeds the same meta-entry desync. Fixing one flaw without the other leaves part of the disagreement in place, which is another reason to take the whole 8.x upgrade rather than hunting for a single patch.
Defensive design follows from the mechanism. Do not let two different parsers make trust decisions about the same archive. Either scan with the same library and version that extracts, or treat the scan as advisory and enforce policy again on the extracted tree before anything executes, serves or copies it. That second pattern survives parser differentials in any library and fits the pipeline controls in our SBOM and SLSA supply chain security guide.
Who the node-tar vulnerabilities expose: npm, CI/CD and artifact services
Exposure needs three things: a tar version before 8.0.0, code that lists or extracts archives, and archive bytes an attacker can influence. CI/CD artifact restore, upload processing, registry mirrors and npm-driven installs on shared runners are the paths to check first.
Work through exposure by path, not by package presence alone. A tar copy sitting in a dependency tree harms nobody until code runs it over archive bytes. The four node-tar vulnerabilities need a vulnerable version plus a parse, list, extract or re-pack call over input an attacker can influence. Rank your estate by how directly untrusted bytes reach that call.
Highest exposure sits in services built to receive archives: upload processors that unpack user files, plugin and theme installers, backup restore endpoints, registry mirrors, and artifact services that preview or repackage tarballs. CVE-2026-140229 can kill these processes with a tiny compressed input. CVE-2026-140235 and CVE-2026-140236 can make their inspection results lie. These services go first in the upgrade queue.
CI/CD comes next, and it hides in plain sight. Cache restore steps, artifact downloads between jobs, release packaging and dependency installs all unpack tarballs. A poisoned cache archive or a compromised artifact can reach the parser with the runner's credentials in scope. Self-hosted runners raise the stakes, because a crashed or misled extraction step runs beside long-lived secrets and network access. The audit in the next section covers runner images as well as application lockfiles, and our CI/CD pipeline setup guide covers the runner hardening that pairs with it.
npm itself needs a careful sentence. npm bundles node-tar, and reporting from Ostorlab and Corgea on 2 December 2026 states that npm 12.2.3 still bundles tar 7.5.22. The four advisories in this guide do not confirm reachability of these specific flaws through a plain npm install. A sibling advisory in the same batch, CVE-2026-140238, demonstrates a Windows npm path where a forged PAX record overwrites package.json and an injected postinstall script runs. That chain belongs to the sibling advisory, but it is a sound reason to keep installs of untrusted packages off Windows runners, or to run them with lifecycle scripts disabled, until npm ships a tar 8 based release.
Lowest exposure: build tools that only unpack archives your own pipeline produced from reviewed source, on isolated runners. Record the scanner finding, track the upstream move to tar 8, and schedule the upgrade with the next toolchain refresh. Trust boundaries drift, though. A tool that unpacks only internal archives today gains an external input tomorrow, and the version check in the next section costs minutes.
Audit every tar copy with npm ls tar and lockfile checks
Start the audit with npm ls tar --all in each Node.js project, then grep the lockfile for the resolved tar version and check the copy bundled with npm itself. Any resolved version before 8.0.0 needs an upgrade plan, a recorded exception, or isolation from untrusted archives.
Run the audit before you argue about priority. The commands below work in any Node.js project and take minutes per repository. The goal is a list of resolved tar versions, not a list of declared ranges, because ranges hide the copy that runs.
# Every tar copy in the resolved tree, direct and transitive
npm ls tar --all
# The version Node resolves from this project
node -p "require('tar/package.json').version"
# Lockfile evidence for code review and tickets
grep -n '"node_modules/tar"' package-lock.json
grep -n '"version"' package-lock.json | head -20
# pnpm and Yarn equivalents
pnpm why tar
yarn why tar
Read the output with the affected ranges in mind. Any version before 8.0.0 is in scope for CVE-2026-140229, CVE-2026-140234 and CVE-2026-140236. CVE-2026-140235 starts at 7.5.0. A tree that resolves tar 7.5.24 is still exposed to all four flaws in this guide, because 7.5.24 fixes only CVE-2026-140242. A tree on 8.0.0 or 8.0.1 clears these four but should still move to 8.0.2 or later for CVE-2026-140240, and the current release at the time of writing is 8.0.5.
Check the npm bundled copy separately. Application lockfiles do not govern the tar copy inside the npm CLI that performs installs on a runner.
# Version of the tar copy bundled with the installed npm CLI
node -p "require(require('path').join(require('child_process').execSync('npm root -g').toString().trim(), 'npm', 'node_modules', 'tar', 'package.json')).version"
# What the registry currently publishes
npm view tar version
npm view tar@8.0.5 engines
For a fleet view, run the same check across repositories and runner images, and fail the job when a vulnerable copy resolves. This small script turns the audit into a CI gate. It reads the JSON tree, walks every node, and exits non-zero when a tar version before 8.0.0 appears.
// check-tar.js: fail CI when any resolved tar copy is before 8.0.0
const { execSync } = require('child_process');
function major(version) {
return parseInt(String(version).split('.')[0], 10);
}
function walk(node, path, bad) {
if (!node || typeof node !== 'object') return;
for (const [name, child] of Object.entries(node.dependencies || {})) {
if (name === 'tar' && major(child.version) < 8) {
bad.push(`${path}tar@${child.version}`);
}
walk(child, `${path}${name} > `, bad);
}
}
const tree = JSON.parse(execSync('npm ls tar --all --json', { encoding: 'utf8' }));
const bad = [];
walk(tree, '', bad);
if (bad.length > 0) {
console.error('Vulnerable tar copies found:');
bad.forEach((line) => console.error(` ${line}`));
process.exit(1);
}
console.log('All resolved tar copies are 8.0.0 or later.');
Pair the version gate with a reachability note per repository: does this code list or extract archives, and can an outsider influence those bytes? Version plus reachability gives you the upgrade order. The reachability habit matches the pipeline security model in our DevSecOps practitioner guide.
Plan the npm tar 8.0.5 upgrade as a major-version port
The npm tar 8.0.5 upgrade is a port, not a patch bump: tar 8 needs Node.js 22 or later, returns promises, drops callbacks and the sync option, and removes most subpath exports. Port direct callers first, test extraction behaviour, and avoid forcing 8.x under untested version 7 consumers.
The npm tar 8.0.5 upgrade clears the four node-tar vulnerabilities in this guide and the later advisories fixed through the 8.x line. It also changes the API under your code. The v8.0.0 release notes list the breaking changes plainly: support for Node.js below 22 is dropped, callbacks and Node.js streams are removed in favour of promises and web streams, the sync option is replaced by dedicated sync functions such as extractSync, ReadEntry and WriteEntry are no longer streams, and the subpath exports shrink to tar, tar/core, tar/raw and tar/core/raw. Treat the work as a small port with tests, not as a dependency bump.
Sequence the port by exposure. Direct callers that extract or list untrusted archives move first. For each caller, update the import surface, convert callback and stream handling to the promise API, and run extraction tests against archives your system really handles: long paths, PAX headers from GNU tar, archives with link entries, and archives with unusual filenames. Joined archives that version 7 read end to end need splitting before the new reader sees them.
Transitive copies need a different conversation. Many build tools depend on tar 7 APIs. Forcing tar 8 under a version 7 consumer through an override can break the consumer at runtime in ways a version check will not catch. Overrides exist for emergencies, and this batch can qualify, but only with a test run of the affected tool paths.
{
"overrides": {
"tar": "^8.0.5"
}
}
Use that override only after the consuming tool passes its own test suite against tar 8, and record the override as temporary debt with an owner. Where the consumer cannot run on tar 8 yet, keep it away from untrusted archives, apply the interim controls in the next section, and track the upstream release that adopts tar 8. The npm CLI itself sits in this bucket while it bundles tar 7.5.22. You cannot override the CLI copy from a project lockfile. Runner image updates and install flags carry that risk until npm ships a tar 8 based release.
Base images deserve the same discipline as lockfiles. Rebuild runner and builder images on Node.js 22 or later, reinstall the toolchain so bundled copies refresh, and re-run the audit script inside the image. Print the resolved versions in the image build log so the evidence travels with the artifact.
Interim controls while tar 7 copies remain in the tree
While tar 7 remains, bound the blast radius: extract in isolated workers with hard memory limits, cap accepted archive size, disable lifecycle scripts for untrusted installs, keep preservePaths off, and enforce policy again on the extracted tree before anything runs it.
Some tar 7 copies will stay in your tree for a while, inside tools you do not control. Interim controls do not fix the node-tar vulnerabilities. They shrink what a crafted archive can reach while the npm tar 8.0.5 upgrade rolls out. Apply them in this order, cheapest first.
Bound memory at the process boundary. Run archive parsing in a worker or container with a hard memory limit, with swap set to the same value, so CVE-2026-140229 becomes a contained OOM kill instead of host-wide pressure. Cap the size of archives you accept from untrusted senders before the parser sees them. Neither control bounds the single-chunk allocation inside the parser. Both limit how far the damage spreads, and both are honest stopgaps rather than fixes.
Keep the dangerous options off. Leave preservePaths disabled for untrusted archives, since CVE-2026-140235 forged paths stay inside the extraction root under default sanitisation. Extract into a fresh, empty directory per archive, owned by a low-privilege user with no write access outside that directory. Delete the directory after use. A forged name or a differential then has little to collide with.
Separate scanning from trust. Because CVE-2026-140234 and CVE-2026-140236 make readers disagree, enforce policy on the extracted tree as well as on the archive listing. Check extracted paths, link targets and file types on disk before a later step executes, serves or copies them. Reject extracted trees that contain link entries pointing outside the extraction root, and reject entry names containing newline or NUL characters at your own validation layer when your use case never needs them.
Control the install path. For npm installs of packages you do not fully trust, disable lifecycle scripts, and prefer isolated runners for Windows installs until npm bundles tar 8. Pin dependencies with lockfiles and keep the version gate from the audit section in CI so a new vulnerable copy cannot re-enter the tree silently.
Watch for the failure signatures. Alert on extraction workers dying with OOM kills, uncaught filesystem throws during extraction, and scanner verdicts that disagree with post-extraction listings. Each signature maps to one of the four flaws. A hit on a tar 7 worker should move that worker to the front of the upgrade queue and trigger a review of archives it handled since 28 November 2026.
Comparison: tar readers, and your fix options side by side
GNU tar, bsdtar and Python tarfile read the advisory test archives consistently where tar 7 diverged, which is why scanner and extractor agreement matters. Among fix options, porting direct callers to tar 8.0.5 closes the flaws; overrides and isolation only manage the copies you cannot port yet.
A comparison helps here, because the core failure in two of the four node-tar vulnerabilities is disagreement between readers. The CVE-2026-140235 advisory ran the same archives through node-tar 7.5.22, GNU tar 1.35 and Python 3.13 tarfile. GNU tar and Python read the true names and sizes. node-tar dropped records and applied forged fields. The CVE-2026-140236 advisory makes the same point for framing: node-tar could see a different entry set from the other readers. tar 8 closes the gap by reading PAX records by length, applying PAX fields once to the entry they describe, requiring decimal safe integers, and ending names at a NUL.
| Reader | PAX record handling | Name at NUL | Role in your pipeline |
|---|---|---|---|
| tar 7.x (node-tar) | Split on newlines, fields forgeable | NUL can survive truncation | Vulnerable extractor and lister |
| tar 8.0.5 (node-tar) | Read by declared length | NUL ends the name | Fixed extractor and lister |
| GNU tar 1.35 | Length-delimited, per advisory tests | Ends the name | Independent listing cross-check |
| Python tarfile 3.13 | Length-delimited, per advisory tests | Ends the name | Independent listing cross-check |
Use the comparison in practice: during the upgrade window, cross-check listings of high-value archives with a second reader, and investigate any disagreement before extraction output is trusted. Agreement between two independent readers is cheap evidence that framing tricks are absent.
Now compare the fix options for each tar copy you found.
| Option | Closes the four CVEs | Cost and risk | Fits when |
|---|---|---|---|
| Port direct callers to tar 8.0.5 | Yes | API port plus tests; Node 22 floor | Your code calls tar on untrusted archives |
| Override tar to 8.x under a tool | Yes, if the tool runs | Runtime breakage risk under version 7 consumers | The tool passes tests against tar 8 |
| Wait for upstream tar 8 adoption | Not yet | Exposure stays; needs interim controls | Tool only handles trusted archives |
| Isolate extraction workers | No | Ongoing sandbox and monitoring cost | Copies you cannot move this cycle |
The use-case split follows the same lines. A public upload service that unpacks customer archives belongs in the first row, this week. A release pipeline that restores its own signed cache archives on isolated runners can take the third row with a tracked exception. A Windows build fleet installing third-party packages needs install flags and runner isolation now, plus pressure on the npm upgrade path. One rule covers every row: no tar copy before 8.0.0 should process archives from outside your trust boundary without isolation and a dated upgrade plan.
Response checklist: verify the npm tar 8.0.5 upgrade and troubleshoot failures
Work the response in order: inventory every tar copy, rank by reachability, port exposed callers to tar 8.0.5, isolate the rest, and verify with the CI version gate. Match OOM kills, filesystem throws and listing disagreements to the four CVEs when failures appear.
Close the loop with a checklist your team can run this week. The order matters: inventory before argument, reachability before scheduling, verification before closure.
- Run
npm ls tar --alland the lockfile grep in every Node.js repository. Record resolved versions in the ticket, not declared ranges. - Check the tar copy bundled with npm on every runner image, and rebuild images on Node.js 22 or later.
- Mark each copy with its reachability: untrusted archives, internal archives only, or build tooling only.
- Port direct callers in the untrusted group to tar 8.0.5. Convert callbacks and streams to the promise API and test extraction against your real archive shapes.
- For transitive copies, test an override only where the consuming tool passes against tar 8. Record every override with an owner and a removal condition.
- Apply interim controls to copies that stay on tar 7: memory limits, size caps, preservePaths off, fresh extraction directories, lifecycle scripts off for untrusted installs.
- Add the version gate script to CI so a tar copy before 8.0.0 fails the build.
- Review extraction logs since 28 November 2026 for OOM kills, filesystem throws and listing disagreements. Re-check archives handled by tar 7 workers in that window.
- Verify the fix in the deployed tree and the runner image, then close the ticket with the version evidence attached.
When extraction fails during the response, match the symptom to the flaw before you change code.
| Symptom | Likely flaw | First checks |
|---|---|---|
| Worker OOM-killed on a small archive | CVE-2026-140229 | Resolved tar version; archive codec; memory limit and swap settings |
| Uncaught filesystem throw during async extract | CVE-2026-140234 | Entry names with NUL or line terminators; tar version; strip option in use |
| Extracted filename differs from scanner listing | CVE-2026-140235 or CVE-2026-140234 | PAX headers in the archive; preservePaths setting; second-reader listing |
| Scanner passes, extra file appears after extract | CVE-2026-140236 | Meta entries in the archive; scanner and extractor library versions |
| Upgrade breaks imports or callbacks | tar 8 API change | Subpath imports; sync option use; Node.js version below 22 |
| Override installs, tool fails at runtime | tar 8 under a version 7 consumer | Consumer test results against tar 8; remove the override and isolate instead |
Two limits deserve a plain statement. First, version evidence proves the parser is fixed; it does not prove past extractions were clean. The log review in step 8 covers the window that version checks cannot. Second, these four CVEs sit inside a larger advisory batch, so a scanner may keep reporting sibling IDs after you close these four. Keep the CI gate at 8.0.0 or later, and prefer the latest 8.x.
The node-tar vulnerabilities reward a boring response: find every copy, rank by reachability, port the exposed callers, isolate the rest, and prove the versions in CI. Teams that run that loop this week turn four parser flaws into a closed ticket and a stronger extraction boundary.
Frequently Asked Questions
Direct answers to common technical, architectural, and production troubleshooting questions.
What are the node-tar vulnerabilities in December 2026?
The node-tar vulnerabilities covered here are CVE-2026-140229, CVE-2026-140234, CVE-2026-140235 and CVE-2026-140236. They affect npm tar versions before 8.0.0, carry CVSS 4.0 scores of 7.1 to 7.2, and were published as GitHub advisories on 28 November 2026 with CVE records on 1 December 2026. The flaws cover memory exhaustion, NUL byte name differentials, forged PAX fields and archive framing disagreements.
How do I check whether my project is affected by the node-tar vulnerabilities?
Run npm ls tar --all in the project and read the resolved versions. Any tar copy before 8.0.0 is in scope, and CVE-2026-140235 starts at 7.5.0. Also grep package-lock.json for the node_modules/tar entry and check the tar copy bundled with the npm CLI on your runners. A copy only matters when code lists or extracts archives an attacker can influence.
Does tar 7.5.24 fix these node-tar vulnerabilities?
No. tar 7.5.24 fixes only CVE-2026-140242, a sibling advisory about non-finite PAX sizes. The four node-tar vulnerabilities in this guide are fixed in tar 8.0.0, and the practical target is the npm tar 8.0.5 upgrade, because CVE-2026-140240 needs 8.0.2 and later advisories were fixed through 8.0.5.
What breaks during the npm tar 8.0.5 upgrade?
The npm tar 8.0.5 upgrade needs Node.js 22 or later. tar 8 removes callbacks and Node.js streams in favour of promises and web streams, replaces the sync option with functions such as extractSync, and keeps only the tar, tar/core, tar/raw and tar/core/raw subpath exports. Port direct callers, test extraction against your real archives, and avoid forcing 8.x under untested version 7 consumers.
Is npm install itself exposed to these flaws?
npm bundles node-tar, and npm 12.2.3 was reported on 2 December 2026 to still bundle tar 7.5.22. The four advisories here do not confirm reachability through a plain npm install. A sibling advisory, CVE-2026-140238, demonstrates a Windows npm chain with an injected postinstall script. Until npm ships tar 8, keep untrusted installs isolated and consider disabling lifecycle scripts on Windows runners.