CVE-2020-7795
Command Injection
Also known as GHSA-4h66-vghf-xg5x
Mitigation
- Upgrade get-npm-package-version to 1.0.7 or later.
Who should check
- Projects that depend on npm package get-npm-package-version (< 1.0.7)
- Anyone running get-npm-package-version >= unspecified, < 1.0.7
Vulnerability facts
- Affected
- get-npm-package-version < 1.0.7
- Fixed in
- 1.0.7
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:POpen in CVSS calculator
Show all 9 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: Low
- E: P
- EPSS
- 3.97% chance of exploitation in 30 days (percentile 91, 2026-11-26)
- CWE
- CWE-77
- Modified
Description
The package get-npm-package-version before 1.0.7 are vulnerable to Command Injection via main function in index.js.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm get-npm-package-version | < 1.0.7 | 1.0.7 | osv |
| get-npm-package-version | >= unspecified, < 1.0.7 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-7795. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-7795.md Affected: get-npm-package-version < 1.0.7 Fixed in: 1.0.7 Steps: 1. Search this machine and project for get-npm-package-version (npm), get-npm-package-version: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Exploits and PoCs
Other
- https://www.npmjs.com/package/get-npm-package-version/v/1.0.6
- https://github.com/hoperyy/get-npm-package-version/blob/338a5882298eb2c2194538db41166cae13c39e03/index.js%23L17
- https://github.com/hoperyy/get-npm-package-version
- https://github.com/hoperyy/get-npm-package-version/blob/338a5882298eb2c2194538db41166cae13c39e03/index.js#L17
FAQ
Is CVE-2020-7795 being exploited?
There is no confirmed exploitation: CVE-2020-7795 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 3.97% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-7795?
High: CVSS 7.3 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2020-7795?
get-npm-package-version < 1.0.7.
Is there a fix for CVE-2020-7795?
Yes. Fixed in 1.0.7. Upgrade get-npm-package-version to 1.0.7 or later.
How do I check if I'm affected by CVE-2020-7795?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.