CVE-2020-7795 Command Injection

High 7.3 Published Updated

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.

PackageAffectedFixed in
get-npm-package-version npmAll versions1.0.7
get-npm-package-version npmAll versions1.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.

Is CVE-2020-7795 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free