CVE-2018-3772 Command Injection in whereis
Attackers can execute arbitrary commands via unsanitized input in the deprecated whereis npm module, requiring migration to the which module.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-3772?
CVE-2018-3772 is a critical command injection vulnerability in https://github.com/vvo whereis, published on 30 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Concatenating unsanitized user input in the `whereis` npm module < 0.4.1 allowed an attacker to execute arbitrary commands. The `whereis` module is deprecated and it is recommended to use the `which` npm module instead.
Which versions are affected by CVE-2018-3772?
2 open source packages ship an affected version, including whereis. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
whereis npm | All versions | 0.4.1 |
whereis npm | All versions | 0.4.1 |
Products include Whereis Project Whereis.
How do I fix CVE-2018-3772?
Upgrade whereis to 0.4.1 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2018-3772 being exploited?
There is no known exploitation of CVE-2018-3772 in the wild and no public exploit code.
Sources
Also known as GHSA-wjr4-2jgw-hmv8.