Skip to content
OpenAdvisories
High · 7.5 CVE-2022-29244 EUVD-2022-6068GHSA-hj9c-8jmm-8c52

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

Published Jun 13, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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 ↗
ReleasePackageFixed inAdvisory
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 ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 nodejs-nodemon 2.0.19-1.el9_0 RLSA-2022:6595
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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

ReleasePackageFixed inAdvisory
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

EcosystemPackageAffectedFixedRecord
npm npm >= 7.9.0, < 8.11.0 8.11.0 GHSA-hj9c-8jmm-8c52

Advisories 9

References