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
- 2026-11-28
The maintainer published the GHSA and identified 8.0.0 as patched.
- 2026-12-01
NVD published the CVE record.
- 2026-12-02
The GitHub advisory record was updated and reviewed.
What to do
-
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.
-
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.
-
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.
-
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
- Watch your stack for exploited flaws
Name the vendors and products you run, and Brandefense alerts you when a CVE in them is exploited.
- See CVE-2026-140245 in Brandefense Atlas
The Atlas record of CVE-2026-140245: severity, exploitation status and the sources behind it.
- Vulnerability intelligence platform
Brandefense Vulnerability Intelligence follows which vulnerabilities attackers are using, so your team can patch what is under attack first.
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
- node-tar symlink path containment advisoryisaacs/node-tar via GitHub Security Advisories
- CVE-2026-140245 NVD recordNIST NVD
- Known Exploited Vulnerabilities catalogCISA