Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Mar 29, 2025

This PR contains the following updates:

Package Change Age Confidence
tar-fs 2.1.1 -> 2.1.3 age confidence

GitHub Vulnerability Alerts

CVE-2024-12905

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);

CVE-2025-48387

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.


Release Notes

mafintosh/tar-fs (tar-fs)

v2.1.3

Compare Source

v2.1.2

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 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.


  • 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 bbb5a0a to a9e8016 Compare June 3, 2025 09:49
@renovate renovate bot changed the title chore(deps): update dependency tar-fs to v2.1.2 [security] chore(deps): update dependency tar-fs to v2.1.3 [security] Jun 3, 2025
@renovate renovate bot force-pushed the renovate/npm-tar-fs-vulnerability branch from a9e8016 to 932ef7b Compare June 22, 2025 14:07
@renovate renovate bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 932ef7b to 0ee67a1 Compare August 10, 2025 13:34
@renovate renovate bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 0ee67a1 to 72265be Compare September 26, 2025 18:46
@renovate renovate bot changed the title chore(deps): update dependency tar-fs to v2.1.3 [security] chore(deps): 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 72265be to f43bca1 Compare September 26, 2025 20:43
@renovate renovate bot changed the title chore(deps): update dependency tar-fs to v2.1.4 [security] chore(deps): update dependency tar-fs to v2.1.3 [security] Sep 26, 2025
@renovate renovate bot force-pushed the renovate/npm-tar-fs-vulnerability branch from f43bca1 to 77f7298 Compare November 11, 2025 02:46
@renovate renovate bot force-pushed the renovate/npm-tar-fs-vulnerability branch from 77f7298 to 7832c40 Compare November 19, 2025 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant