CVE-2021-23359 Arbitrary Command Injection
Attackers can execute arbitrary commands via unsanitized user input in the port-killer npm package due to unsafe use of child_process exec.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-23359?
CVE-2021-23359 is a high-severity command injection vulnerability in port-killer, published on 18 Mar 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
This affects all versions of package port-killer. If (attacker-controlled) user input is given, it is possible for an attacker to execute arbitrary commands. This is due to use of the child_process exec function without input sanitization. Running this PoC will cause the command touch success to be executed, leading to the creation of a file called success.
Weakness: CWE-78
Which versions are affected by CVE-2021-23359?
2 open source packages ship an affected version, including port-killer. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
port-killer npm | All versions to 1.0.1 | None |
port-killer npm | All versions to 1.0.1 | None |
Products include Port-Killer Project Port-Killer.
How do I fix CVE-2021-23359?
No fix has been published for CVE-2021-23359 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-2021-23359 being exploited?
There is no known exploitation of CVE-2021-23359 in the wild and no public exploit code.
Sources
Also known as GHSA-2548-q746-x5x6.