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.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)4.0%top 9.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
AlmaLinux:9nodejs1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:9nodejs-docs1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:9nodejs-full-i18n1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:9nodejs-libs1:16.16.0-1.el9_0ALSA-2022:6595
AlmaLinux:9nodejs-nodemon2.0.19-1.el9_0ALSA-2022:6595
AlmaLinux:9npm1:8.11.0-1.16.16.0.1.el9_0ALSA-2022:6595
Rocky Linux:9nodejs-nodemon0:2.0.19-1.el9_0RLSA-2022:6595
Ubuntu:22.04:LTSnpmno fix listedUBUNTU-CVE-2022-29244
Ubuntu:24.04:LTSnpmno fix listedUBUNTU-CVE-2022-29244
Ubuntu:25.10npmno fix listedUBUNTU-CVE-2022-29244
Ubuntu:26.04:LTSnpmno fix listedUBUNTU-CVE-2022-29244
Ubuntu:26.10npmno fix listedUBUNTU-CVE-2022-29244
npmnpm8.11.0GHSA-hj9c-8jmm-8c52

Affected products (as reported)

VendorProductVersions
npm npm 7.9.0 – before 7.9.0*8.11.0 – before 8.11.0

Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References