NodeJS/npm/7.24.1
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:
- https://github.com/npm/cli/security/advisories/GHSA-hj9c-8jmm-8c52
- https://github.com/nodejs/node/releases/tag/v16.15.1
- https://github.com/nodejs/node/releases/tag/v17.9.1
- https://github.com/nodejs/node/releases/tag/v18.3.0
- https://github.com/npm/cli/releases/tag/v8.11.0
- https://github.com/npm/cli/tree/latest/workspaces/libnpmpack
- https://github.com/npm/cli/tree/latest/workspaces/libnpmpublish
- https://github.com/npm/npm-packlist
- https://github.com/advisories/GHSA-hj9c-8jmm-8c52
- https://nvd.nist.gov/vuln/detail/CVE-2022-29244
- https://github.com/nodejs/node/pull/43210
- https://security.netapp.com/advisory/ntap-20220722-0007/
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.0or greater), run:npm i -g npm@latest - Node.js versions
v16.15.1,v17.19.1&v18.3.0include the patchedv8.11.0version ofnpm
Steps to take to see if you're impacted
- Run
npm publish --dry-runornpm packwith annpmversion>=7.9.0&<8.11.0inside the project's root directory using a workspace flag like:--workspacesor--workspace=<name>(ex.npm pack --workspace=foo) - Check the output in your terminal which will list the package contents (note:
tar -tvf <package-on-disk>also works) - 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 - CVE-2022-29244
npm-packlistlibnpmpacklibnpmpublish
Affected versions: ["8.10.0", "8.9.0", "8.8.0", "8.7.0", "8.6.0", "8.5.5", "8.5.4", "8.5.3", "8.5.2", "8.5.1", "8.5.0", "8.4.1", "8.4.0", "8.3.2", "8.3.1", "8.3.0", "8.2.0", "8.1.4", "8.1.3", "8.1.2", "8.1.1", "8.1.0", "8.0.0", "7.24.2", "7.24.1", "7.24.0", "7.23.0", "7.22.0", "7.21.1", "7.21.0", "7.20.6", "7.20.5", "7.20.4", "7.20.3", "7.20.2", "7.20.1", "7.20.0", "7.19.1", "7.19.0", "7.18.1", "7.18.0", "7.17.0", "7.16.0", "7.15.1", "7.15.0", "7.14.0", "7.13.0", "7.12.1", "7.12.0", "7.11.2", "7.11.1", "7.11.0", "7.10.0", "7.9.0"]
Secure versions: [10.0.0, 10.0.0-pre.0, 10.0.0-pre.1, 10.1.0, 10.2.0, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.3.0, 10.4.0, 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, 10.9.2, 10.9.3, 10.9.4, 11.0.0, 11.0.0-pre.0, 11.0.0-pre.1, 11.1.0, 11.2.0, 11.3.0, 11.4.0, 11.4.1, 11.4.2, 11.5.0, 11.5.1, 11.5.2, 11.6.0, 11.6.1, 11.6.2, 11.6.3, 11.6.4, 11.7.0, 6.14.10, 6.14.11, 6.14.12, 6.14.13, 6.14.14, 6.14.15, 6.14.16, 6.14.17, 6.14.18, 6.14.6, 6.14.7, 6.14.8, 6.14.9, 7.0.0, 7.0.0-beta.0, 7.0.0-beta.1, 7.0.0-beta.10, 7.0.0-beta.11, 7.0.0-beta.12, 7.0.0-beta.13, 7.0.0-beta.2, 7.0.0-beta.3, 7.0.0-beta.4, 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-rc.0, 7.0.0-rc.1, 7.0.0-rc.2, 7.0.0-rc.3, 7.0.0-rc.4, 7.0.1, 7.0.10, 7.0.11, 7.0.12, 7.0.13, 7.0.14, 7.0.15, 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.1.0, 7.1.1, 7.1.2, 7.2.0, 7.3.0, 7.4.0, 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, 7.7.5, 7.7.6, 7.8.0, 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, 8.19.2, 8.19.3, 8.19.4, 9.0.0, 9.0.0-pre.0, 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.1, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.2.0, 9.3.0, 9.3.1, 9.4.0, 9.4.1, 9.4.2, 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, 9.9.0, 9.9.1, 9.9.2, 9.9.3, 9.9.4]
Recommendation: Update to version 11.7.0.
576 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 2.8.4 | Artistic-2.0 | 7 | 2015-04-17 - 07:55 | over 10 years |
| 2.8.3 | Artistic-2.0 | 7 | 2015-04-16 - 02:04 | over 10 years |
| 2.8.2 | Artistic-2.0 | 7 | 2015-04-15 - 00:20 | over 10 years |
| 2.8.1 | Artistic-2.0 | 7 | 2015-04-13 - 02:36 | over 10 years |
| 2.8.0 | Artistic-2.0 | 7 | 2015-04-10 - 12:32 | over 10 years |
| 2.7.6 | Artistic-2.0 | 7 | 2015-04-03 - 08:21 | over 10 years |
| 2.7.5 | Artistic-2.0 | 7 | 2015-03-27 - 10:29 | over 10 years |
| 2.7.4 | Artistic-2.0 | 7 | 2015-03-20 - 08:05 | over 10 years |
| 2.7.3 | Artistic-2.0 | 7 | 2015-03-17 - 01:05 | almost 11 years |
| 2.7.2 | Artistic-2.0 | 7 | 2015-03-13 - 08:58 | almost 11 years |
| 2.7.1 | Artistic-2.0 | 7 | 2015-03-06 - 08:43 | almost 11 years |
| 2.7.0 | Artistic-2.0 | 7 | 2015-02-27 - 13:13 | almost 11 years |
| 2.6.1 | Artistic-2.0 | 7 | 2015-02-20 - 16:54 | almost 11 years |
| 2.6.0 | Artistic-2.0 | 7 | 2015-02-13 - 13:13 | almost 11 years |
| 2.5.1 | Artistic-2.0 | 7 | 2015-02-06 - 09:05 | almost 11 years |
| 2.5.0 | Artistic-2.0 | 7 | 2015-01-30 - 10:59 | almost 11 years |
| 2.4.1 | Artistic-2.0 | 7 | 2015-01-24 - 02:26 | almost 11 years |
| 2.4.0 | Artistic-2.0 | 7 | 2015-01-23 - 14:39 | almost 11 years |
| 2.3.0 | Artistic-2.0 | 7 | 2015-01-16 - 07:05 | almost 11 years |
| 2.2.0 | Artistic-2.0 | 7 | 2015-01-09 - 04:25 | almost 11 years |
| 2.1.18 | Artistic-2.0 | 7 | 2015-01-02 - 06:50 | almost 11 years |
| 2.1.17 | Artistic-2.0 | 7 | 2014-12-25 - 11:31 | almost 11 years |
| 2.1.16 | Artistic-2.0 | 7 | 2014-12-22 - 16:20 | almost 11 years |
| 2.1.15 | Artistic-2.0 | 7 | 2014-12-19 - 13:38 | almost 11 years |
| 2.1.14 | Artistic-2.0 | 7 | 2014-12-13 - 22:12 | about 11 years |
| 2.1.13 | Artistic-2.0 | 7 | 2014-12-12 - 09:42 | about 11 years |
| 2.1.12 | Artistic-2.0 | 7 | 2014-12-05 - 07:43 | about 11 years |
| 2.1.11 | Artistic-2.0 | 7 | 2014-11-28 - 02:25 | about 11 years |
| 2.1.10 | Artistic-2.0 | 7 | 2014-11-21 - 07:43 | about 11 years |
| 2.1.9 | Artistic-2.0 | 7 | 2014-11-14 - 05:44 | about 11 years |
| 2.1.8 | Artistic-2.0 | 7 | 2014-11-07 - 01:20 | about 11 years |
| 2.1.7 | Artistic-2.0 | 7 | 2014-10-31 - 09:36 | about 11 years |
| 2.1.6 | Artistic-2.0 | 7 | 2014-10-24 - 08:30 | about 11 years |
| 2.1.5 | Artistic-2.0 | 7 | 2014-10-17 - 06:47 | about 11 years |
| 2.1.4 | Artistic-2.0 | 7 | 2014-10-10 - 06:25 | about 11 years |
| 2.1.3 | Artistic-2.0 | 7 | 2014-10-03 - 01:13 | about 11 years |
| 2.1.2 | Artistic-2.0 | 7 | 2014-09-30 - 03:06 | about 11 years |
| 2.1.1 | Artistic-2.0 | 7 | 2014-09-27 - 00:32 | about 11 years |
| 2.1.0 | Artistic-2.0 | 7 | 2014-09-26 - 09:23 | about 11 years |
| 2.0.2 | Artistic-2.0 | 7 | 2014-09-20 - 00:04 | about 11 years |
| 2.0.1 | Artistic-2.0 | 7 | 2014-09-19 - 07:05 | about 11 years |
| 2.0.0 | Artistic-2.0 | 7 | 2014-09-13 - 09:14 | over 11 years |
| 2.0.0-beta.3 | Artistic-2.0 | 7 | 2014-09-05 - 08:01 | over 11 years |
| 2.0.0-beta.2 | Artistic-2.0 | 7 | 2014-08-30 - 01:55 | over 11 years |
| 2.0.0-beta.1 | Artistic-2.0 | 7 | 2014-08-29 - 06:05 | over 11 years |
| 2.0.0-beta.0 | Artistic-2.0 | 7 | 2014-08-22 - 00:41 | over 11 years |
| 2.0.0-alpha.7 | Artistic-2.0 | 7 | 2014-08-15 - 03:02 | over 11 years |
| 2.0.0-alpha.6 | Artistic-2.0 | 7 | 2014-08-15 - 02:28 | over 11 years |
| 2.0.0-alpha.6.0 | Artistic-2.0 | 7 | 2014-08-08 - 01:10 | over 11 years |
| 2.0.0-alpha-5 | Artistic-2.0 | 7 | 2014-07-23 - 01:46 | over 11 years |
