Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Node-Tar PAX Record Forgery (CVE-2026-140235 and CVE-2026-140238)

CVE-2026-140235 and CVE-2026-140238 are related PAX parsing flaws in node-tar, the tar npm package.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-140238
Vendor
node-tar maintainers
Affected Product
tar npm package (node-tar)
Exploitation
Not confirmed
Published
2026-12-01

Both advisories describe newline splitting where byte-length framing should protect a record. This lets a crafted archive forge entry fields; CVE-2026-140235 describes dropped records, while CVE-2026-140238 demonstrates a path overwrite inside the extraction target. Both advisories list tar 8.0.0 as patched; compare each advisory's affected range before triage.

What it allows

How Do CVE-2026-140235 and CVE-2026-140238 Forge PAX Fields?

Both advisories trace the issue to PAX records being parsed at newline boundaries instead of their declared byte lengths. The vulnerable parser splits the header body at newline characters and checks each resulting line on its own. CVE-2026-140235 also describes the original record being dropped while a later fragment is accepted as a forged field. A newline inside an attacker-controlled value can thus make later text appear to be a separate record.

node-tar then applies accepted PAX attributes over the entry's original header values. The maintainer demonstrates that a forged path can make extraction overwrite a file elsewhere within the extraction target. This affects direct extraction without component stripping on POSIX and Windows systems. See the vulnerability intelligence platform page for product context while assessing this dependency.

A second chain requires npm installation on Windows and its path normalization with one path component stripped. Under those conditions, the maintainer reproduced an overwrite of an installed package's manifest and execution of an injected lifecycle script. That demonstration does not make every node-tar extraction a code execution path.

For triage, identify workflows that extract untrusted archives or package partially untrusted directory trees. Review extraction logs and resulting file changes for writes outside each archive entry's expected subdirectory. This is our defensive inference from the demonstrated overwrite behavior, not a detection signature supplied by the vendor.

Both advisories include public reproductions, which show technical feasibility under test conditions. Neither documents exploitation against a deployment. CISA's KEV catalog dated 30 November 2026 listed neither CVE-2026-140235 nor CVE-2026-140238.

Who is affected

Which Versions Do CVE-2026-140235 and CVE-2026-140238 Affect?

GitHub lists tar 7.5.0 through versions below 8.0.0 for CVE-2026-140235. It lists all versions below 8.0.0 for CVE-2026-140238 and confirms reproduction through 7.5.22. Both advisories identify 8.0.0 as patched. The broader CVE-2026-140238 advisory gives no inclusive lower bound, so this page does not define one shared automated version range.

Check direct and transitive tar dependencies in application and build environments. Confirm the installed version, the deployed artifact, and whether the application extracts archives from untrusted sources. The software supply chain risk management guide offers a broader workflow for reviewing dependency exposure.

Upgrade affected installations to tar 8.0.0 or a later fixed release. The 8.0.0 release changes the API and drops support for Node.js versions below 22, so plan compatibility testing before deployment. After updating, verify the resolved tar version in the deployed environment and repeat the check in build jobs.

While scheduling the change, limit which archive sources can enter affected workflows and review unexpected file replacements under extraction targets. These are our interim recommendations based on the maintainer's impact description. Track the upgrade and verification in the patch management process.

Timeline

  1. 2026-11-28

    GitHub published both node-tar PAX advisories, GHSA-rgjp-p5j7-w36x and GHSA-mpg7-vg3p-wc3m; tar 8.0.0 is the patched release.

  2. 2026-12-01

    NVD published the CVE-2026-140235 and CVE-2026-140238 records.

What to do

  1. Inventory archive workflows

    Find applications, CI jobs, and package pipelines that use tar to extract untrusted archives or package partially untrusted directory trees. Record the resolved tar version.

  2. Upgrade with compatibility checks

    Update affected tar dependencies to 8.0.0 or a later fixed release. Test the API migration and Node.js 22 requirement stated in the 8.0.0 release notes.

  3. Verify the deployed version

    Inspect the deployed application and build environment after the update. Confirm that each resolved tar package version is 8.0.0 or later.

  4. Review unexpected writes

    Investigate file replacements outside an archive entry's expected subdirectory in affected extraction workflows. This is our defensive check based on the vendor's demonstrated overwrite.

What Brandefense can do

Frequently Asked Questions

Why are CVE-2026-140235 and CVE-2026-140238 on one page?

Their GitHub advisories describe the same PAX byte-length versus newline parsing weakness and forged entry fields. CVE-2026-140235 emphasizes dropped records and cross-implementation differences; CVE-2026-140238 demonstrates path overwrite and a conditional Windows npm execution chain.

What can CVE-2026-140238 do during direct extraction?

The maintainer demonstrates a forged PAX path that overwrites an unexpected file within the extraction target. Direct extraction without component stripping is exposed on POSIX and Windows.

Does the Windows npm demonstration apply to every platform?

No. The demonstrated npm lifecycle-script chain depends on Windows path normalization and one stripped path component. The advisory distinguishes this from direct extraction.

Which tar release fixes both node-tar PAX CVEs?

Both GitHub advisories identify tar 8.0.0 as patched. Check the resolved version after updating, then test compatibility with its changed API and Node.js requirement.

Does the published reproduction establish observed attacks?

It demonstrates the flaw in controlled tests. The advisory does not document an attack against a deployed system.

Sources

  1. node-tar PAX Record Forgery Advisorynode-tar maintainers via GitHub Security Advisories
  2. tar v8.0.0 Releasenode-tar maintainers
  3. CVE-2026-140238 RecordNIST NVD
  4. Known Exploited Vulnerabilities CatalogCISA
  5. node-tar PAX Record Parsing and Field Injection Advisorynode-tar maintainers via GitHub Security Advisories
  6. CVE-2026-140235 RecordNIST NVD
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →