Vulnerability · Published Jun 13, 2022 · Assigned by GitHub_M
CVE-2022-29244npm packing does not respect root-level ignore files in workspaces
High 7.5
In plain English
A high-severity information exposure in npm from npm. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.0% (higher than 91% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
npm pack ignores root-level .gitignore and .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` inside a workspace, as of v7.9.0 and v7.13.0 respectively, may be affected and have published files into the npm registry they did not intend to include. Users should upgrade to the latest, patched version of npm v8.11.0, run: npm i -g npm@latest . Node.js versions v16.15.1, v17.19.1, and v18.3.0 include the patched v8.11.0 version of npm.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | nodejs | 1:16.16.0-1.el9_0 | ALSA-2022:6595 |
| AlmaLinux:9 | nodejs-docs | 1:16.16.0-1.el9_0 | ALSA-2022:6595 |
| AlmaLinux:9 | nodejs-full-i18n | 1:16.16.0-1.el9_0 | ALSA-2022:6595 |
| AlmaLinux:9 | nodejs-libs | 1:16.16.0-1.el9_0 | ALSA-2022:6595 |
| AlmaLinux:9 | nodejs-nodemon | 2.0.19-1.el9_0 | ALSA-2022:6595 |
| AlmaLinux:9 | npm | 1:8.11.0-1.16.16.0.1.el9_0 | ALSA-2022:6595 |
| Rocky Linux:9 | nodejs-nodemon | 0:2.0.19-1.el9_0 | RLSA-2022:6595 |
| Ubuntu:22.04:LTS | npm | no fix listed | UBUNTU-CVE-2022-29244 |
| Ubuntu:24.04:LTS | npm | no fix listed | UBUNTU-CVE-2022-29244 |
| Ubuntu:25.10 | npm | no fix listed | UBUNTU-CVE-2022-29244 |
| Ubuntu:26.04:LTS | npm | no fix listed | UBUNTU-CVE-2022-29244 |
| Ubuntu:26.10 | npm | no fix listed | UBUNTU-CVE-2022-29244 |
| npm | npm | 8.11.0 | GHSA-hj9c-8jmm-8c52 |
Affected products (as reported)
Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/npm/cli/security/advisories/GHSA-hj9c-8jmm-8c52 x_refsource_MISC
- https://github.com/npm/npm-packlist x_refsource_MISC
- https://github.com/npm/cli/tree/latest/workspaces/libnpmpublish x_refsource_MISC
- https://github.com/npm/cli/tree/latest/workspaces/libnpmpack x_refsource_MISC
- https://github.com/nodejs/node/pull/43210 x_refsource_MISC
- https://github.com/npm/cli/releases/tag/v8.11.0 x_refsource_MISC
- https://github.com/nodejs/node/releases/tag/v16.15.1 x_refsource_MISC
- https://github.com/nodejs/node/releases/tag/v17.9.1 x_refsource_MISC
- https://github.com/nodejs/node/releases/tag/v18.3.0 x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20220722-0007/ x_refsource_CONFIRM