CVE-2022-29244

npm packing does not respect root-level ignore files in workspaces

Published Jun 13, 2022 CVSS 3.1 · 7.5 High EPSS 4.0% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2022-6068 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.
Github GHSA Github GHSA GHSA-hj9c-8jmm-8c52 Packing does not respect root-level ignore files in workspaces
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 23, 2025, 4:23 PM
Reserved
Apr 13, 2022, 12:00 AM
Status
Modified
Published
Jun 13, 2022, 2:15 PM
Modified
Jun 17, 2026, 4:39 AM
Severity
Moderate
Public date
Jun 13, 2022, 12:00 AM