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

node-tar Symlink Path Validation Flaw (CVE-2026-140245)

CVE-2026-140245 affects the npm tar package, also known as node-tar, from version 7.5.5 up to but excluding 8.0.0.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-140245
Vendor
isaacs/node-tar
Affected Product
tar (npm)
Exploitation
Not confirmed
Published
2026-11-28

A crafted archive can cause extraction to create a symbolic link whose target points outside the extraction directory. The maintainer says this can happen with default options and without a warning.The risk depends on what the application does after extraction. The maintainer says node-tar's later archive entries cannot follow that link, but a caller that later writes through the extracted path can write outside the destination. Teams using a vulnerability intelligence platform should trace archive handling in their own applications.The GitHub advisory rates the issue High with a CVSS 4.0 score of 7.2. Its published reproduction demonstrates the flaw against npm's tar 7.5.22 package. That controlled test does not establish exploitation in deployed systems.

What it allows

How Does CVE-2026-140245 Escape the Extraction Directory?

According to the maintainer, node-tar validates a relative symbolic-link target against a directory derived from the archive entry's path. It creates the link using a different resolution of that entry path. When the entry path ends with a dot component, the two locations differ by one directory level.

The validation can therefore approve a target that resolves outside the intended extraction directory when the link is created. The advisory demonstrates this behavior on the published npm package with default extraction options. It also reports the same result with the strip option used in a package-management path.

The distinction matters for impact. Node-tar's subsequent archive entries do not follow the link because its directory and file-write protections block that chain. A separate application operation that later writes through the link could reach outside the destination. The maintainer does not claim that node-tar itself writes outside the destination or that this is npm remote code execution.

The maintainer published a reproduction on 28 November 2026. CISA's KEV catalog version dated 30 November did not list CVE-2026-140245. The node-tar 8.0.0 security update gives context for the release's archive handling fixes.

Who is affected

Which node-tar Versions and Workflows Are Affected?

The maintainer lists npm tar versions 7.5.5 through 7.5.22 as affected and 8.0.0 as patched. Its package range is at least 7.5.5 and below 8.0.0. The advisory says version 7.5.4 rejected the demonstrated entry, which makes this a regression in the later 7.5.x series.

Applications are exposed when they extract an archive they do not fully trust and later use a path created within that extraction tree. The later operation must follow the symbolic link for an outside write to occur. Check direct and transitive npm tar installations in services, developer tools, build jobs and deployment images.

Determine which application owns each extraction workflow and whether the extracted tree is used afterward. The software dependency risk guide explains how to track package ownership and remediation across environments. These inventory and workflow checks are our defensive recommendations based on the maintainer's impact description.

Timeline

  1. 2026-11-28

    The maintainer published the GHSA and identified 8.0.0 as patched.

  2. 2026-12-01

    NVD published the CVE record.

  3. 2026-12-02

    The GitHub advisory record was updated and reviewed.

What to do

  1. Inventory archive workflows

    Find direct and transitive npm tar installations. Identify applications that process less-trusted archives and later use paths inside the extracted tree.

  2. Upgrade and verify

    Upgrade affected tar installations to version 8.0.0 or later. Confirm the resolved package version in lockfiles, deployed services, build jobs and images after the update.

  3. Review later path use

    Check whether application code writes through paths in an extracted tree. Resolve each destination against the intended directory and reject escapes before writing. This is our defensive recommendation.

  4. Investigate suspicious outcomes

    Review archive-processing records for unexpected symbolic links or later file writes outside the extraction directory. A missing extraction warning does not exclude this flaw; these are investigation leads, not published detection signatures.

What Brandefense can do

Frequently Asked Questions

What version fixes CVE-2026-140245?

The node-tar maintainer lists npm tar 8.0.0 as patched. Verify the resolved version in every service and build environment that processes archives.

Does node-tar itself write outside the extraction directory?

The maintainer says its later archive entries cannot follow the created link. An outside write requires a caller to write through that path after extraction.

Does the published reproduction prove active exploitation?

No. The advisory reproduces the behavior against npm tar 7.5.22 in a controlled test. It does not document exploitation in a deployed system.

Sources

  1. node-tar symlink path containment advisoryisaacs/node-tar via GitHub Security Advisories
  2. CVE-2026-140245 NVD recordNIST NVD
  3. Known Exploited Vulnerabilities catalogCISA
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 →