fix: update dependency tar to v7.5.7 [security]#521
Merged
renovate[bot] merged 1 commit intomainfrom Jan 29, 2026
Merged
Conversation
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:
7.5.4→7.5.7GitHub Vulnerability Alerts
CVE-2026-24842
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, secretsRelease Notes
isaacs/node-tar (tar)
v7.5.7Compare Source
v7.5.6Compare Source
v7.5.5Compare Source
Configuration
📅 Schedule: Branch creation - "" in timezone America/Chicago, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.