{"id":"CVE-2022-29244","aliases":["CVE-2022-29244","GHSA-hj9c-8jmm-8c52"],"related":[],"kind":"vulnerability","state":"published","title":"npm packing does not respect root-level ignore files in workspaces","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n`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](https://github.com/npm/cli/releases/tag/v7.9.0) & [v7.13.0](https://github.com/npm/cli/releases/tag/v7.13.0) respectively, may be affected and have published files into the npm registry they did not intend to include.\n\n### Patch\n- Upgrade to the latest, patched version of `npm` ([`v8.11.0`](https://github.com/npm/cli/releases/tag/v8.11.0) or greater), run: `npm i -g npm@latest`\n- Node.js versions [`v16.15.1`](https://github.com/nodejs/node/releases/tag/v16.15.1), [`v17.19.1`](https://github.com/nodejs/node/releases/tag/v17.9.1) & [`v18.3.0`](https://github.com/nodejs/node/releases/tag/v18.3.0) include the patched `v8.11.0` version of `npm`\n\n#### Steps to take to see if you're impacted\n1. Run `npm publish --dry-run` or `npm pack` with an `npm` version `>=7.9.0` & `<8.11.0` inside the project's root directory using a workspace flag like: `--workspaces` or `--workspace=<name>` (ex. `npm pack --workspace=foo`)\n2. Check the output in your terminal which will list the package contents (note: `tar -tvf <package-on-disk>` also works)\n3. If you find that there are files included you did not expect, you should:\n  3.1. Create & publish a new release excluding those files (ref. [\"Keeping files out of your Package\"](https://docs.npmjs.com/cli/v8/using-npm/developers#keeping-files-out-of-your-package))\n  3.2. Deprecate the old package (ex. `npm deprecate <pkg>[@<version>] <message>`)\n  3.3. Revoke or rotate any sensitive information (ex. passwords, tokens, secrets etc.) which might have been exposed\n### References\n- [CVE-2022-29244](https://nvd.nist.gov/vuln/detail/CVE-2022-29244)\n- [`npm-packlist`](https://github.com/npm/npm-packlist)\n- [`libnpmpack`](https://github.com/npm/cli/tree/latest/workspaces/libnpmpack)\n- [`libnpmpublish`](https://github.com/npm/cli/tree/latest/workspaces/libnpmpublish)","format":"markdown","source":"ghsa"},{"lang":"es","text":"npm pack ignora las directivas de exclusión de archivos .gitignore y .npmignore a nivel de root cuando es ejecutado en un espacio de trabajo o con un flag de espacio de trabajo (es decir, \"--workspaces\", \"--workspace=(name)\"). Cualquiera que haya ejecutado \"npm pack\" o \"npm publish\" dentro de un espacio de trabajo, a partir de v7.9.0 y v7.13.0 respectivamente, puede estar afectado y haber publicado archivos en el registro de npm que no tenía intención de incluir. Los usuarios deben actualizar a la última versión parcheada de npm v8.11.0, ejecutar: npm i -g npm@latest . Las versiones de Node.js versiones v16.15.1, v17.19.1 y v18.3.0 incluyen la versión parcheada v8.11.0 de npm","source":"nvd"}],"published":"2022-06-02T15:37:27.000Z","modified":"2026-06-17T04:39:54.333Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-200"],"affected":[{"ranges":[{"type":"custom","introduced":"7.9.0","fixed":"7.9.0*","status":"affected"},{"type":"custom","introduced":"8.11.0","fixed":"8.11.0","status":"affected"}],"vendor":"npm","product":"npm","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.9.0","status":"affected","fixed":"8.11.0"}],"ecosystem":"npm","package":"npm","purl":"pkg:npm/npm","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"7.9.0","fixed":"8.11.0"}],"vendor":"npmjs","product":"npm","cpe":"cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"ontap_select_deploy_administration_utility","cpe":"cpe:2.3:a:netapp:ontap_select_deploy_administration_utility:-:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/npm/cli/security/advisories/GHSA-hj9c-8jmm-8c52","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/npm-packlist","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/cli/tree/latest/workspaces/libnpmpublish","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/cli/tree/latest/workspaces/libnpmpack","tags":["product","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/node/pull/43210","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/cli/releases/tag/v8.11.0","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/node/releases/tag/v16.15.1","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/node/releases/tag/v17.9.1","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/node/releases/tag/v18.3.0","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20220722-0007/","tags":["third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29244","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/npm/cli","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20220722-0007","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-04-23T16:23:19.387Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-29244","url":"https://www.cve.org/CVERecord?id=CVE-2022-29244","licence":"CVE Terms of Use","modified":"2025-04-23T16:23:31.058Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hj9c-8jmm-8c52","url":"https://github.com/advisories/GHSA-hj9c-8jmm-8c52","licence":"CC-BY-4.0","modified":"2023-11-08T04:09:11.980Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-29244","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29244","licence":"Public domain","modified":"2026-06-17T04:39:54.333Z"}],"updatedAt":"2026-11-25T22:58:12.250Z","epss":{"score":0.04004,"percentile":0.9079,"date":"2026-12-01T12:00:22.000Z"}}