CVE-2020-7602 OS Command Injection in node-prompt-here
Attackers can execute arbitrary commands via unsanitized input in the node-prompt-here library's device retrieval function.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2020-7602?
CVE-2020-7602 is a critical command injection vulnerability in node-prompt-here, published on 15 Mar 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
node-prompt-here through 1.0.1 allows execution of arbitrary commands. The "runCommand()" is called by "getDevices()" function in file "linux/manager.js", which is required by the "index. process.env.NM_CLI" in the file "linux/manager.js". This function is used to construct the argument of function "execSync()", which can be controlled by users without any sanitization.
Weakness: CWE-78
Which versions are affected by CVE-2020-7602?
2 open source packages ship an affected version, including node-prompt-here. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
node-prompt-here npm | All versions to 1.0.1 | None |
node-prompt-here npm | All versions to 1.0.1 | None |
Products include Node-Prompt-Here Project Node-Prompt-Here.
How do I fix CVE-2020-7602?
No fix has been published for CVE-2020-7602 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2020-7602 being exploited?
There is no known exploitation of CVE-2020-7602 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-f8fh-8rgm-227h, SNYK-JS-NODEPROMPTHERE-560115.