CVE-2020-7795 Command Injection
Attackers can execute arbitrary commands via the main function in the get-npm-package-version npm package.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-7795?
CVE-2020-7795 is a high-severity command injection vulnerability in get-npm-package-version, published on 2 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The package get-npm-package-version before 1.0.7 are vulnerable to Command Injection via main function in index.js.
Weakness: CWE-77
Which versions are affected by CVE-2020-7795?
2 open source packages ship an affected version, including get-npm-package-version. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
get-npm-package-version npm | All versions | 1.0.7 |
get-npm-package-version npm | All versions | 1.0.7 |
Products include Get-Npm-Package-Version Project Get-Npm-Package-Version.
How do I fix CVE-2020-7795?
Upgrade get-npm-package-version to 1.0.7 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2020-7795 being exploited?
There is no known exploitation of CVE-2020-7795 in the wild and no public exploit code.
Sources
Also known as GHSA-4h66-vghf-xg5x.