NodeJS/npm/8.1.4


a package manager for JavaScript

https://www.npmjs.com/package/npm
Artistic-2.0

1 Security Vulnerabilities

Packing does not respect root-level ignore files in workspaces

Published date: 2022-06-02T15:37:27Z
CVE: CVE-2022-29244
Links:

Impact

npm pack ignores root-level .gitignore & .npmignore file exclusion directives when run in a workspace or with a workspace flag (ie. --workspaces, --workspace=<name>). Anyone who has run npm pack or npm publish with workspaces, as of v7.9.0 & v7.13.0 respectively, may be affected and have published files into the npm registry they did not intend to include.

Patch

  • Upgrade to the latest, patched version of npm (v8.11.0 or greater), run: npm i -g npm@latest
  • Node.js versions v16.15.1, v17.19.1 & v18.3.0 include the patched v8.11.0 version of npm

Steps to take to see if you're impacted

  1. Run npm publish --dry-run or npm pack with an npm version >=7.9.0 & <8.11.0 inside the project's root directory using a workspace flag like: --workspaces or --workspace=<name> (ex. npm pack --workspace=foo)
  2. Check the output in your terminal which will list the package contents (note: tar -tvf <package-on-disk> also works)
  3. If you find that there are files included you did not expect, you should: 3.1. Create & publish a new release excluding those files (ref. Keeping files out of your Package) 3.2. Deprecate the old package (ex. npm deprecate <pkg>[@<version>] <message>) 3.3. Revoke or rotate any sensitive information (ex. passwords, tokens, secrets etc.) which might have been exposed ### References
  4. CVE-2022-29244
  5. npm-packlist
  6. libnpmpack
  7. libnpmpublish

Affected versions: ["7.9.0", "7.10.0", "7.11.0", "7.11.1", "7.11.2", "7.12.0", "7.12.1", "7.13.0", "7.14.0", "7.15.0", "7.15.1", "7.16.0", "7.17.0", "7.18.0", "7.18.1", "7.19.0", "7.19.1", "7.20.0", "7.20.1", "7.20.2", "7.20.3", "7.20.4", "7.20.5", "7.20.6", "7.21.0", "7.21.1", "7.22.0", "7.23.0", "7.24.0", "7.24.1", "7.24.2", "8.0.0", "8.1.0", "8.1.1", "8.1.2", "8.1.3", "8.1.4", "8.2.0", "8.3.0", "8.3.1", "8.3.2", "8.4.0", "8.4.1", "8.5.0", "8.5.1", "8.5.2", "8.5.3", "8.5.4", "8.5.5", "8.6.0", "8.7.0", "8.8.0", "8.9.0", "8.10.0"]
Secure versions: [6.14.6, 6.14.7, 7.0.0-beta.0, 7.0.0-beta.1, 7.0.0-beta.2, 7.0.0-beta.3, 7.0.0-beta.4, 6.14.8, 7.0.0-beta.5, 7.0.0-beta.6, 7.0.0-beta.7, 7.0.0-beta.8, 7.0.0-beta.9, 7.0.0-beta.10, 7.0.0-beta.11, 7.0.0-beta.12, 7.0.0-beta.13, 7.0.0-rc.0, 7.0.0-rc.1, 7.0.0-rc.2, 7.0.0-rc.3, 7.0.0-rc.4, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 7.0.6, 7.0.7, 7.0.8, 7.0.9, 7.0.10, 7.0.11, 7.0.12, 7.0.13, 6.14.9, 7.0.14, 7.0.15, 7.1.0, 7.1.1, 7.1.2, 7.2.0, 6.14.10, 7.3.0, 7.4.0, 6.14.11, 7.4.1, 7.4.2, 7.4.3, 7.5.0, 7.5.1, 7.5.2, 7.5.3, 7.5.4, 7.5.5, 7.5.6, 7.6.0, 7.6.1, 7.6.2, 7.6.3, 7.7.0, 7.7.1, 7.7.2, 7.7.3, 7.7.4, 6.14.12, 7.7.5, 7.7.6, 7.8.0, 6.14.13, 6.14.14, 6.14.15, 6.14.16, 6.14.17, 8.11.0, 8.12.0, 8.12.1, 8.12.2, 8.13.0, 8.13.1, 8.13.2, 8.14.0, 8.15.0, 8.15.1, 8.16.0, 8.17.0, 8.18.0, 8.19.0, 8.19.1, 9.0.0-pre.0, 8.19.2, 9.0.0-pre.1, 9.0.0-pre.2, 9.0.0-pre.3, 9.0.0-pre.4, 9.0.0-pre.5, 9.0.0-pre.6, 9.0.0, 9.0.1, 9.1.0, 8.19.3, 9.1.1, 9.1.2, 9.1.3, 9.2.0, 6.14.18, 9.3.0, 9.3.1, 9.4.0, 9.4.1, 9.4.2, 8.19.4, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.6.2, 9.6.3, 9.6.4, 9.6.5, 9.6.6, 9.6.7, 9.7.0, 9.7.1, 9.7.2, 9.8.0, 9.8.1, 10.0.0-pre.0, 10.0.0-pre.1, 10.0.0, 10.1.0, 10.2.0, 9.9.0, 10.2.1, 10.2.2, 10.2.3, 9.9.1, 9.9.2, 10.2.4, 10.2.5, 10.3.0, 10.4.0, 9.9.3, 10.5.0, 10.5.1, 10.5.2, 10.6.0, 10.7.0, 10.8.0, 10.8.1, 10.8.2, 10.8.3, 10.9.0, 10.9.1, 11.0.0-pre.0, 10.9.2, 11.0.0-pre.1, 9.9.4, 11.0.0, 11.1.0, 11.2.0, 11.3.0]
Recommendation: Update to version 11.3.0.

562 Other Versions

Version License Security Released
3.7.4 Artistic-2.0 6 2016-02-19 - 04:06 about 9 years
3.7.3 Artistic-2.0 6 2016-02-11 - 23:31 over 9 years
3.7.2 Artistic-2.0 6 2016-02-05 - 00:17 over 9 years
3.7.1 Artistic-2.0 6 2016-02-01 - 23:33 over 9 years
3.7.0 Artistic-2.0 6 2016-01-29 - 01:51 over 9 years
3.6.0 Artistic-2.0 6 2016-01-22 - 00:46 over 9 years
3.5.4 Artistic-2.0 6 2016-01-08 - 00:21 over 9 years
3.5.3 Artistic-2.0 6 2015-12-11 - 08:01 over 9 years
3.5.2 Artistic-2.0 6 2015-12-04 - 02:49 over 9 years
3.5.1 Artistic-2.0 6 2015-11-25 - 23:00 over 9 years
3.5.0 Artistic-2.0 6 2015-11-20 - 03:29 over 9 years
3.4.1 Artistic-2.0 6 2015-11-13 - 00:56 over 9 years
3.4.0 Artistic-2.0 6 2015-11-06 - 01:40 over 9 years
3.3.12 Artistic-2.0 6 2015-11-02 - 19:41 over 9 years
3.3.11 Artistic-2.0 6 2015-10-30 - 01:28 over 9 years
3.3.10 Artistic-2.0 6 2015-10-22 - 23:42 over 9 years
3.3.9 Artistic-2.0 6 2015-10-16 - 00:21 over 9 years
3.3.8 Artistic-2.0 6 2015-10-12 - 17:51 over 9 years
3.3.7 Artistic-2.0 6 2015-10-09 - 00:31 over 9 years
3.3.6 Artistic-2.0 6 2015-10-01 - 18:41 over 9 years
3.3.5 Artistic-2.0 6 2015-09-24 - 23:53 over 9 years
3.3.4 Artistic-2.0 6 2015-09-17 - 23:13 over 9 years
3.3.3 Artistic-2.0 6 2015-09-11 - 00:59 over 9 years
3.3.2 Artistic-2.0 6 2015-09-03 - 23:53 over 9 years
3.3.1 Artistic-2.0 6 2015-08-28 - 00:36 over 9 years
3.3.0 Artistic-2.0 6 2015-08-14 - 20:05 over 9 years
3.2.2 Artistic-2.0 6 2015-08-08 - 06:20 almost 10 years
3.2.1 Artistic-2.0 6 2015-08-01 - 03:41 almost 10 years
3.2.0 Artistic-2.0 6 2015-07-25 - 03:22 almost 10 years
3.1.3 Artistic-2.0 6 2015-07-18 - 05:34 almost 10 years
3.1.2 Artistic-2.0 6 2015-07-13 - 20:55 almost 10 years
3.1.1 Artistic-2.0 6 2015-07-10 - 09:31 almost 10 years
3.1.0 Artistic-2.0 6 2015-07-03 - 04:28 almost 10 years
3.0.0 Artistic-2.0 6 2015-06-26 - 01:33 almost 10 years
2.15.12 Artistic-2.0 5 2017-03-27 - 20:07 about 8 years
2.15.11 Artistic-2.0 5 2016-09-09 - 02:52 over 8 years
2.15.10 Artistic-2.0 5 2016-08-12 - 01:08 almost 9 years
2.15.9 Artistic-2.0 5 2016-06-30 - 23:45 almost 9 years
2.15.8 Artistic-2.0 5 2016-06-18 - 03:23 almost 9 years
2.15.7 Artistic-2.0 5 2016-06-17 - 03:10 almost 9 years
2.15.6 Artistic-2.0 5 2016-05-13 - 04:01 about 9 years
2.15.5 Artistic-2.0 5 2016-05-06 - 01:50 about 9 years
2.15.4 Artistic-2.0 5 2016-04-21 - 23:16 about 9 years
2.15.3 Artistic-2.0 5 2016-04-01 - 02:15 about 9 years
2.15.2 Artistic-2.0 5 2016-03-24 - 22:49 about 9 years
2.15.1 Artistic-2.0 5 2016-03-18 - 00:22 about 9 years
2.15.0 Artistic-2.0 7 2016-03-11 - 01:23 about 9 years
2.14.22 Artistic-2.0 7 2016-03-04 - 00:24 about 9 years
2.14.21 Artistic-2.0 7 2016-02-26 - 00:06 about 9 years
2.14.20 Artistic-2.0 7 2016-02-19 - 00:02 about 9 years