CVE-2022-21191
global-modules-path Command Injection vulnerability
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.4
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
- Record
CVE-2022-21191- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P - Weakness
- CWE-78, CWE-77
- Updated
- 2026-11-02
EUVDEUVD-2023-0565
7.4
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
- Record
EUVD-2023-0565- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vvj3-85vf-fgmw
9.8
global-modules-path Command Injection vulnerability
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
- Record
GHSA-vvj3-85vf-fgmw- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-77, CWE-78
- Updated
- 2026-11-02
NVD
7.4
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
- Record
CVE-2022-21191- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78, CWE-77
- Updated
- 2026-11-02
OSV
7.4
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
- Record
CVE-2022-21191- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVGHSA-vvj3-85vf-fgmw
9.8
global-modules-path Command Injection vulnerability
Versions of the package global-modules-path before 3.0.0 are vulnerable to Command Injection due to missing input sanitization or other checks and sandboxes being employed to the getPath function.
- Record
GHSA-vvj3-85vf-fgmw- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-77, CWE-78
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
global-modules-pathnpm |
before 3.0.0 | 3.0.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-21191 is a high vulnerability (CVSS 7.4) in Global-modules-path Project Global-modules-path, published January 13, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.54%, the 75th percentile. Fixed in global-modules-path 3.0.0.
References
security.snyk.io/vuln/SNYK-JS-GLOBALMODULESPATH-3167973
github.com/lorenzomigliorero/npm-node-utils/blob/b55dd81c597db657c9751332bb2242403fd3e26b/index.js%23L186
github.com/rosen-vladimirov/global-modules-path/releases/tag/v3.0.0
github.com/rosen-vladimirov/global-modules-path/commit/edbdaff077ea0cf295b1469923c06bbccad3c180
nvd.nist.gov/vuln/detail/CVE-2022-21191
github.com/advisories/GHSA-vvj3-85vf-fgmw
github.com/CVEProject/cvelistV5/tree/main/cves/2022/21xxx/CVE-2022-21191.json
github.com/rosen-vladimirov/global-modules-path