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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| npm | npm | 7.9.0 – < 7.9.0*, 8.11.0 – < 8.11.0 | 7.9.0* |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | npm | No fix yet | — |
| Ubuntu 26.04 LTS | npm | No fix yet | — |
| Ubuntu 25.10 | npm | No fix yet | — |
| Ubuntu 24.04 LTS | npm | No fix yet | — |
| Ubuntu 22.04 LTS | npm | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | npm | No fix yet | — |
| Ubuntu 14.04 LTS | npm | No fix yet | — |
| Ubuntu Pro 18.04 LTS | npm | No fix yet | — |
| Ubuntu Pro 16.04 LTS | npm | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | nodejs +3 | 1:16.16.0-1.el9_0 | RHSA-2022:6595 |
| RHEL 9 | nodejs-nodemon | 2.0.19-1.el9_0 | RHSA-2022:6595 |
| RHEL 9 | npm | 1:8.11.0-1.16.16.0.1.el9_0 | RHSA-2022:6595 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 9 | nodejs +3 | 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
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 9 | nodejs-nodemon | 2.0.19-1.el9_0 | RLSA-2022:6595 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP4 | nodejs16 | 16.17.0-150400.3.6.1 | SUSE-SU-2022:3250-1 |
| SLES 15 SP3 | nodejs16 | 16.17.0-150300.7.9.1 | SUSE-SU-2022:3251-1 |
| SLES 12 | nodejs16 | 16.17.0-8.9.1 | SUSE-SU-2022:3196-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | nodejs16 | 16.17.0-1.1 | openSUSE-SU-2024:12280-1 |
| openSUSE Leap 15.4 | nodejs16 | 16.17.0-150400.3.6.1 | SUSE-SU-2022:3250-1 |
| openSUSE Leap 15.3 | nodejs16 | 16.17.0-150300.7.9.1 | SUSE-SU-2022:3251-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | nodejs +3 | 1:16.16.0-1.el9_0 | ELSA-2022-6595 |
| Oracle Linux 9 | nodejs-nodemon | 2.0.19-1.el9_0 | ELSA-2022-6595 |
| Oracle Linux 9 | npm | 1:8.11.0-1.16.16.0.1.el9_0 | ELSA-2022-6595 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | npm | >= 7.9.0, < 8.11.0 | 8.11.0 | GHSA-hj9c-8jmm-8c52 |
Advisories 9
- ALSA-2022:6595 Moderate: nodejs and nodejs-nodemon security and bug fix update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2022:6595 Red Hat Security Advisory: nodejs and nodejs-nodemon security and bug fix update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RLSA-2022:6595 Moderate: nodejs and nodejs-nodemon security and bug fix update Rocky Linux Security Advisories · Feb 4, 2026
- openSUSE-SU-2024:12280-1 corepack16-16.17.0-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:3196-1 Security update for nodejs16 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:3251-1 Security update for nodejs16 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:3250-1 Security update for nodejs16 SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2022-0293 npm: Schwachstelle ermöglicht Offenlegung von Informationen BSI CERT-Bund (WID) · Apr 4, 2023
- ELSA-2022-6595 Moderate: nodejs and nodejs-nodemon security and bug fix update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Sep 22, 2022
References
- 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/nodejs/node/pull/43210
- 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/