fix(deps): update dependency tar to v7 [security]#31
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
fix(deps): update dependency tar to v7 [security]#31renovate[bot] wants to merge 1 commit intomasterfrom
renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
2898194 to
d454101
Compare
d454101 to
709d128
Compare
709d128 to
542591e
Compare
542591e to
cde5dd0
Compare
cde5dd0 to
05bfefd
Compare
05bfefd to
a909042
Compare
a909042 to
44b0b9c
Compare
44b0b9c to
5f7fcd9
Compare
5f7fcd9 to
44b6ee0
Compare
44b6ee0 to
2a536a8
Compare
2a536a8 to
9e6fa3d
Compare
9e6fa3d to
2f17a50
Compare
2f17a50 to
9295c4b
Compare
9295c4b to
5cf937e
Compare
5cf937e to
3e42940
Compare
599435e to
5eccb6a
Compare
5eccb6a to
f9b8c4e
Compare
f9b8c4e to
c28acdf
Compare
c28acdf to
c9cae38
Compare
c9cae38 to
7b287dd
Compare
7b287dd to
ec22a21
Compare
ec22a21 to
028f989
Compare
028f989 to
c62ccb9
Compare
c62ccb9 to
c770dd7
Compare
c770dd7 to
be4376d
Compare
be4376d to
b14cf3c
Compare
b14cf3c to
8009222
Compare
8009222 to
953ba69
Compare
953ba69 to
dedbd3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.4.6→^7.5.11Denial of service while parsing a tar file due to lack of folders count validation
CVE-2024-28863 / GHSA-f5x3-32g6-xq36
More information
Details
Description:
During some analysis today on npm's
node-tarpackage I came across the folder creation process, Basicly if you provide node-tar with a path like this./a/b/c/foo.txtit would create every folder and sub-folder here a, b and c until it reaches the last folder to createfoo.txt, In-this case I noticed that there's no validation at all on the amount of folders being created, that said we're actually able to CPU and memory consume the system running node-tar and even crash the nodejs client within few seconds of running it using a path with too many sub-folders insideSteps To Reproduce:
You can reproduce this issue by downloading the tar file I provided in the resources and using node-tar to extract it, you should get the same behavior as the video
Proof Of Concept:
Here's a video show-casing the exploit:
Impact
Denial of service by crashing the nodejs client when attempting to parse a tar archive, make it run out of heap memory and consuming server CPU and memory resources
Report resources
payload.txt
archeive.tar.gz
Note
This report was originally reported to GitHub bug bounty program, they asked me to report it to you a month ago
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
node-tar is Vulnerable to Arbitrary File Overwrite and Symlink Poisoning via Insufficient Path Sanitization
CVE-2026-23745 / GHSA-8qq5-rm4j-mr97
More information
Details
Summary
The
node-tarlibrary (<= 7.5.2) fails to sanitize thelinkpathofLink(hardlink) andSymbolicLinkentries whenpreservePathsis false (the default secure behavior). This allows malicious archives to bypass the extraction root restriction, leading to Arbitrary File Overwrite via hardlinks and Symlink Poisoning via absolute symlink targets.Details
The vulnerability exists in
src/unpack.tswithin the[HARDLINK]and[SYMLINK]methods.1. Hardlink Escape (Arbitrary File Overwrite)
The extraction logic uses
path.resolve(this.cwd, entry.linkpath)to determine the hardlink target. Standard Node.js behavior dictates that if the second argument (entry.linkpath) is an absolute path,path.resolveignores the first argument (this.cwd) entirely and returns the absolute path.The library fails to validate that this resolved target remains within the extraction root. A malicious archive can create a hardlink to a sensitive file on the host (e.g.,
/etc/passwd) and subsequently write to it, if file permissions allow writing to the target file, bypassing path-based security measures that may be in place.2. Symlink Poisoning
The extraction logic passes the user-supplied
entry.linkpathdirectly tofs.symlinkwithout validation. This allows the creation of symbolic links pointing to sensitive absolute system paths or traversing paths (../../), even when secure extraction defaults are used.PoC
The following script generates a binary TAR archive containing malicious headers (a hardlink to a local file and a symlink to
/etc/passwd). It then extracts the archive using standardnode-tarsettings and demonstrates the vulnerability by verifying that the local "secret" file was successfully overwritten.Impact
LinkandSymbolicLinktar entries from extracted packages.)Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:N/SC:H/SI:L/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Race Condition in node-tar Path Reservations via Unicode Ligature Collisions on macOS APFS
CVE-2026-23950 / GHSA-r6q2-hw4h-h46w
More information
Details
TITLE: Race Condition in node-tar Path Reservations via Unicode Sharp-S (ß) Collisions on macOS APFS
AUTHOR: Tomás Illuminati
Details
A race condition vulnerability exists in
node-tar(v7.5.3) this is to an incomplete handling of Unicode path collisions in thepath-reservationssystem. On case-insensitive or normalization-insensitive filesystems (such as macOS APFS, In which it has been tested), the library fails to lock colliding paths (e.g.,ßandss), allowing them to be processed in parallel. This bypasses the library's internal concurrency safeguards and permits Symlink Poisoning attacks via race conditions. The library uses aPathReservationssystem to ensure that metadata checks and file operations for the same path are serialized. This prevents race conditions where one entry might clobber another concurrently.In MacOS the
join(normalizeUnicode(p)),FS confuses ß with ss, but this code does not. For example:PoC
Impact
This is a Race Condition which enables Arbitrary File Overwrite. This vulnerability affects users and systems using node-tar on macOS (APFS/HFS+). Because of using
NFDUnicode normalization (in whichßandssare different), conflicting paths do not have their order properly preserved under filesystems that ignore Unicode normalization (e.g., APFS (in whichßcauses an inode collision withss)). This enables an attacker to circumvent internal parallelization locks (PathReservations) using conflicting filenames within a malicious tar archive.Remediation
Update
path-reservations.jsto use a normalization form that matches the target filesystem's behavior (e.g.,NFKD), followed by firsttoLocaleLowerCase('en')and thentoLocaleUpperCase('en').Users who cannot upgrade promptly, and who are programmatically using
node-tarto extract arbitrary tarball data should filter out allSymbolicLinkentries (as npm does) to defend against arbitrary file writes via this file system entry name collision issue.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal
CVE-2026-24842 / GHSA-34x7-hfp2-rc4v
More information
Details
Summary
node-tar contains a vulnerability where the security check for hardlink entries uses different path resolution semantics than the actual hardlink creation logic. This mismatch allows an attacker to craft a malicious TAR archive that bypasses path traversal protections and creates hardlinks to arbitrary files outside the extraction directory.
Details
The vulnerability exists in
lib/unpack.js. When extracting a hardlink, two functions handle the linkpath differently:Security check in
[STRIPABSOLUTEPATH]:Hardlink creation in
[HARDLINK]:Example: An application extracts a TAR using
tar.extract({ cwd: '/var/app/uploads/' }). The TAR contains entrya/b/c/d/xas a hardlink to../../../../etc/passwd.Security check resolves the linkpath relative to the entry's parent directory:
a/b/c/d/ + ../../../../etc/passwd=etc/passwd. No../prefix, so it passes.Hardlink creation resolves the linkpath relative to the extraction directory (
this.cwd):/var/app/uploads/ + ../../../../etc/passwd=/etc/passwd. This escapes to the system's/etc/passwd.The security check and hardlink creation use different starting points (entry directory
a/b/c/d/vs extraction directory/var/app/uploads/), so the same linkpath can pass validation but still escape. The deeper the entry path, the more levels an attacker can escape.PoC
Setup
Create a new directory with these files:
package.json
{ "dependencies": { "tar": "^7.5.0" } }secret.txt (sensitive file outside uploads/)
server.js (vulnerable file upload server)
create-malicious-tar.js (attacker creates exploit TAR)
Run
Impact
An attacker can craft a malicious TAR archive that, when extracted by an application using node-tar, creates hardlinks that escape the extraction directory. This enables:
Immediate (Read Attack): If the application serves extracted files, attacker can read any file readable by the process.
Conditional (Write Attack): If the application later writes to the hardlink path, it modifies the target file outside the extraction directory.
Remote Code Execution / Server Takeover
~/.ssh/authorized_keys/etc/cron.d/*,~/.crontab~/.bashrc,~/.profile.js,.php,.pyfiles/etc/systemd/system/*.service/etc/passwd(if running as root)Data Exfiltration & Corruption
.env, secretsSeverity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar Extraction
CVE-2026-26960 / GHSA-83g3-92jg-28cx
More information
Details
Summary
tar.extract()in Nodetarallows an attacker-controlled archive to create a hardlink inside the extraction directory that points to a file outside the extraction root, using default options.This enables arbitrary file read and write as the extracting user (no root, no chmod, no
preservePaths).Severity is high because the primitive bypasses path protections and turns archive extraction into a direct filesystem access primitive.
Details
The bypass chain uses two symlinks plus one hardlink:
a/b/c/up -> ../..a/b/escape -> c/up/../..exfil(hardlink) ->a/b/escape/<target-relative-to-parent-of-extract>Why this works:
Linkpath checks are string-based and do not resolve symlinks on disk for hardlink target safety.
STRIPABSOLUTEPATHlogic in:../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:255../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:268../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:281Hardlink extraction resolves target as
path.resolve(cwd, entry.linkpath)and then callsfs.link(target, destination).../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:566../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:567../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:703Parent directory safety checks (
mkdir+ symlink detection) are applied to the destination path of the extracted entry, not to the resolved hardlink target path.../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:617../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/unpack.js:619../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/mkdir.js:27../tar-audit-setuid - CVE/node_modules/tar/dist/commonjs/mkdir.js:101As a result,
exfilis created inside extraction root but linked to an external file. The PoC confirms shared inode and successful read+write viaexfil.PoC
hardlink.js
Environment used for validation:
v25.4.07.5.7tar.extract({ file, cwd }))Steps:
Prepare/locate a
tarmodule. Ifrequire('tar')is not available locally, setTAR_MODULEto an absolute path to a tar package directory.Run:
TAR_MODULE="$(cd '../tar-audit-setuid - CVE/node_modules/tar' && pwd)" node hardlink.jsInterpretation:
same_inode=true: extractedexfiland external secret are the same file object.read_ok=true: readingexfilleaks external content.write_ok=true: writingexfilmodifies external file.Impact
Vulnerability type:
Who is impacted:
tardefaults.Potential outcomes:
Severity
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
tar has Hardlink Path Traversal via Drive-Relative Linkpath
CVE-2026-29786 / GHSA-qffp-2rhf-9h96
More information
Details
Summary
tar(npm) can be tricked into creating a hardlink that points outside the extraction directory by using a drive-relative link target such asC:../target.txt, which enables file overwrite outsidecwdduring normaltar.x()extraction.Details
The extraction logic in
Unpack[STRIPABSOLUTEPATH]checks for..segments before stripping absolute roots.What happens with
linkpath: "C:../target.txt":/gives['C:..', 'target.txt'], soparts.includes('..')is false.stripAbsolutePath()removesC:and rewrites the value to../target.txt.cwdand escapes one directory up.This is reachable in standard usage (
tar.x({ cwd, file })) when extracting attacker-controlled tar archives.PoC
Tested on Arch Linux with
tar@7.5.9.PoC script (
poc.cjs):Run:
Observed output:
PWNEDconfirms outside file content overwrite. Link count2confirms the extracted file and../target.txtare hardlinked.Impact
This is an arbitrary file overwrite primitive outside the intended extraction root, with the permissions of the process performing extraction.
Realistic scenarios:
Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:H/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
node-tar Symlink Path Traversal via Drive-Relative Linkpath
CVE-2026-31802 / GHSA-9ppj-qmqm-q256
More information
Details
Summary
tar(npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such asC:../../../target.txt, which enables file overwrite outsidecwdduring normaltar.x()extraction.Details
The extraction logic in
Unpack[STRIPABSOLUTEPATH]validates..segments against a resolved path that still uses the original drive-relative value, and only afterwards rewrites the storedlinkpathto the stripped value.What happens with
linkpath: "C:../../../target.txt":stripAbsolutePath()removesC:and rewrites the value to../../../target.txt.../../../target.txt) from nested patha/b/l.../target.txt).This is reachable in standard usage (
tar.x({ cwd, file })) when extracting attacker-controlled tar archives.PoC
Tested on Arch Linux with
tar@7.5.10.PoC script (
poc.cjs):Run:
Observed output:
PWNEDconfirms outside file content overwrite.readlinkandls -lconfirm the extracted symlink points outside the extraction directory.Impact
This is an arbitrary file overwrite primitive outside the intended extraction root, with the permissions of the process performing extraction.
Realistic scenarios:
Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
isaacs/node-tar (tar)
v7.5.11Compare Source
v7.5.10Compare Source
v7.5.9Compare Source
v7.5.8Compare Source
v7.5.7Compare Source
v7.5.6Compare Source
v7.5.5Compare Source
v7.5.4Compare Source
v7.5.3Compare Source
v7.5.2Compare Source
v7.5.1Compare Source
v7.5.0Compare Source
v7.4.4Compare Source
v7.4.3Compare Source
v7.4.2Compare Source
v7.4.1Compare Source
v7.4.0Compare Source
v7.3.0Compare Source
v7.2.0Compare Source
v7.1.0Compare Source
v7.0.1Compare Source
v7.0.0Compare Source
v6.2.1Compare Source
v6.2.0Compare Source
v6.1.15Compare Source
v6.1.14Compare Source
v6.1.13Compare Source
Dependencies
cc4e0dd#343 bump minipass from 3.3.6 to 4.0.0v6.1.12Compare Source
Bug Fixes
57493ee#332 ensuring close event is emited after stream has ended (@webark)b003c64#314 replace deprecated String.prototype.substr() (#314) (@CommanderRoot, @lukekarrys)Documentation
f129929#313 remove dead link to benchmarks (#313) (@yetzt)c1faa9fadd examples/explanation of using tar.t (@isaacs)v6.1.11Compare Source
v6.1.10Compare Source
v6.1.9Compare Source
v6.1.8Compare Source
v6.1.7Compare Source
v6.1.6Compare Source
v6.1.5Compare Source
v6.1.4Compare Source
v6.1.3Compare Source
v6.1.2Compare Source
v6.1.1Compare Source
v6.1.0Compare Source
v6.0.5Compare Source
v6.0.4Compare Source
v6.0.3Compare Source
v6.0.2Compare Source
v6.0.1Compare Source
v6.0.0Compare Source
v5.0.11Compare Source
v5.0.10Compare Source
v5.0.9Compare Source
v5.0.8Compare Source
v5.0.7Compare Source
v5.0.6Compare Source
v5.0.5Compare Source
v5.0.4Compare Source
v5.0.2Compare Source
v5.0.1Compare Source
v5.0.0Compare Source
v4.4.19Compare Source
v4.4.18Compare Source
v4.4.17Compare Source
v4.4.16Compare Source
v4.4.15Compare Source
v4.4.14Compare Source
v4.4.13Compare Source
v4.4.12Compare Source
v4.4.11Compare Source
v4.4.10Compare Source
v4.4.9Compare Source
v4.4.8Compare Source
v4.4.7Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.