npm packing does not respect root-level ignore files in workspaces
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 1 fixed, 1 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-200.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| npm | npm | 7.9.0 and later; 8.11.0 to before 8.11.0 | 8.11.0 | Patch available | CNA |
| — | npm (npm) | 7.9.0 to before 8.11.0 | 8.11.0 | Patch available | GHSA-hj9c-8jmm-8c52 |
- npm Vendornpm Affected 7.9.0 and later; 8.11.0 to before 8.11.0 Fixed in 8.11.0 Patch available CNA
- npm (npm) Vendor— Affected 7.9.0 to before 8.11.0 Fixed in 8.11.0 Patch available GHSA-hj9c-8jmm-8c52
Remediation
- Fix · CNA npm (npm) Fixed in 8.11.0
- Fix · GHSA-hj9c-8jmm-8c52 npm (npm) Fixed in 8.11.0 Advisory →
Red Hat 1 advisory
- RHSA-2022:6595 Released 2022-09-20 · Red Hat rating Moderatenodejs and nodejs-nodemon security and bug fix update
- Red Hat Enterprise Linux AppStream (v. 9) nodejs-1:16.16.0-1.el9_0, nodejs-docs-1:16.16.0-1.el9_0, nodejs-full-i18n-1:16.16.0-1.el9_0 +3
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2022:6595 |
Not affected: 3 products
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux AppStream (v. 9)
- Red Hat Software Collections
Timeline
- 2026-10-02 Threatist record created from CVE-2022-29244
- 2026-10-03 Alias added: GHSA-hj9c-8jmm-8c52
- 2026-10-07 EPSS moved to the 90th–95th percentile
References
Advisory 10
- https://github.com/npm/cli/security/advisories/GHSA-hj9c-8jmm-8c52
- https://github.com/npm/npm-packlist
- https://github.com/npm/cli/tree/latest/workspaces/libnpmpublish
- https://github.com/npm/cli/tree/latest/workspaces/libnpmpack
- https://github.com/npm/cli/releases/tag/v8.11.0
- 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://security.netapp.com/advisory/ntap-20220722-0007/
- https://nvd.nist.gov/vuln/detail/CVE-2022-29244
Sources
- CVE-2022-29244 · CVE Program
- CVE-2022-29244 · NVD
- FIRST EPSS
- GHSA-hj9c-8jmm-8c52 · GitHub Advisory Database · CC BY 4.0
- CVE-2022-29244 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences