ThinkFacility Sign in
  1. Home
  2. Security
  3. npm package (tar)
Highnpm package (tar)

node-tar before 8.0.2: 19 flaws let crafted archives escape the folder or crash Node, update now

Node.js developers whose code or dependencies unpack tar archives with the tar package, especially archives someone else made.

How to fix it

You haveUpdate to
< 8.0.2→8.0.2

Check your version

Which version your project has
npm ls tar

Update

In your project
npm update tar
npm ls tar
Still old? A dependency pins it
npm explain tar
Then check what's left
npm audit

Crafted archives could put symlinks outside the extraction folder, forge file names or crash and hang Node. Most fixes landed in 8.0.0, a new major version, and 8.0.2 has them all. Version 7.5.24 fixes only one, so staying on 7 leaves the rest open.

If npm ls still shows an old version under another package, update that package, or add an "overrides" entry for this one in package.json.

Sources