Skip to content

Update dependency tar-fs to v2.1.4 [SECURITY]#90

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-tar-fs-vulnerability
Open

Update dependency tar-fs to v2.1.4 [SECURITY]#90
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/npm-tar-fs-vulnerability

Conversation

@renovate
Copy link
Copy Markdown

@renovate renovate Bot commented Mar 29, 2025

This PR contains the following updates:

Package Change Age Confidence
tar-fs 2.0.02.1.4 age confidence

tar-fs Vulnerable to Link Following and Path Traversal via Extracting a Crafted tar File

CVE-2024-12905 / GHSA-pq67-2wwv-3xjx

More information

Details

An Improper Link Resolution Before File Access ("Link Following") and Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package.

This issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.7.

PoC
// Create a writable stream to extract the tar content
const extractStream = tarfs.extract('/', {
    // We can ignore the file type checks to allow the extraction of the malicious file
    ignore: (name) => false,
});

// Create a tar stream
const tarStream = tarfs.pack().on('error', (err) => {
    throw err;
});

// Append the malicious entry to the tar stream
tarStream.entry({ name: '/flag.txt', mode: 0o644 }, Buffer.from('This is a flag!'));

// Finalize the tar stream
tarStream.finalize();

// Pipe the tar stream into the extract stream
tarStream.pipe(extractStream);

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


tar-fs can extract outside the specified dir with a specific tarball

CVE-2025-48387 / GHSA-8cj5-5rvv-wf4v

More information

Details

Impact

v3.0.8, v2.1.2, v1.16.4 and below

Patches

Has been patched in 3.0.9, 2.1.3, and 1.16.5

Workarounds

You can use the ignore option to ignore non files/directories.

  ignore (_, header) {
    // pass files & directories, ignore e.g. symlinks
    return header.type !== 'file' && header.type !== 'directory'
  }
Credit

Thank you Caleb Brown from Google Open Source Security Team for reporting this in detail.

Severity

  • CVSS Score: 8.7 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


tar-fs has a symlink validation bypass if destination directory is predictable with a specific tarball

CVE-2025-59343 / GHSA-vj76-c3g6-qr5v

More information

Details

Impact

v3.1.0, v2.1.3, v1.16.5 and below

Patches

Has been patched in 3.1.1, 2.1.4, and 1.16.6

Workarounds

You can use the ignore option to ignore non files/directories.

  ignore (_, header) {
    // pass files & directories, ignore e.g. symlinks
    return header.type !== 'file' && header.type !== 'directory'
  }
Credit

Reported by: Mapta / BugBunny_ai

Severity

  • CVSS Score: 8.7 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

mafintosh/tar-fs (tar-fs)

v2.1.4

Compare Source

v2.1.3

Compare Source

v2.1.2

Compare Source

v2.1.1

Compare Source

v2.1.0

Compare Source

v2.0.1

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 9044345 to 6e5e40a Compare June 6, 2025 01:28
@renovate renovate Bot changed the title Update dependency tar-fs to v2.1.2 [SECURITY] Update dependency tar-fs to v2.1.3 [SECURITY] Jun 6, 2025
@renovate renovate Bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 6e5e40a to 6d78337 Compare August 10, 2025 13:53
@renovate renovate Bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 6d78337 to 0a9811c Compare September 26, 2025 21:10
@renovate renovate Bot changed the title Update dependency tar-fs to v2.1.3 [SECURITY] Update dependency tar-fs to v2.1.4 [SECURITY] Sep 26, 2025
@renovate renovate Bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 0a9811c to cec3b8d Compare March 5, 2026 19:17
@renovate renovate Bot changed the title Update dependency tar-fs to v2.1.4 [SECURITY] Update dependency tar-fs to v2.1.4 [SECURITY] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/npm-tar-fs-vulnerability branch March 27, 2026 01:26
@renovate renovate Bot changed the title Update dependency tar-fs to v2.1.4 [SECURITY] - autoclosed Update dependency tar-fs to v2.1.4 [SECURITY] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-tar-fs-vulnerability branch 2 times, most recently from cec3b8d to 4a88809 Compare March 30, 2026 22:31
@renovate renovate Bot changed the title Update dependency tar-fs to v2.1.4 [SECURITY] Update dependency tar-fs to v2.1.4 [SECURITY] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title Update dependency tar-fs to v2.1.4 [SECURITY] - autoclosed Update dependency tar-fs to v2.1.4 [SECURITY] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/npm-tar-fs-vulnerability branch 2 times, most recently from 4a88809 to 37d74e8 Compare April 27, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants