GHSA-8j6j-4h2c-c65p Arbitrary Code Execution in require-node
Attackers can execute arbitrary OS commands on the server by injecting malicious payloads into the require-node endpoint request body.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-8j6j-4h2c-c65p?
GHSA-8j6j-4h2c-c65p is a command injection vulnerability in require-node, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Versions of require-node prior to 1.3.4 for 1.x and 2.0.4 for 2.x are vulnerable to Arbitrary Code Execution. The package fails to sanitize requests to the require-node endpoint, allowing attackers to execute arbitrary code in the server through the injection of OS commands in the request body.
Recommendation
- If you are using 1.x, upgrade to version 1.3.4 or later.
- If you are using 2.x, upgrade to version 2.0.4 or later.
Which versions are affected by GHSA-8j6j-4h2c-c65p?
4 open source packages ship an affected version, including require-node.
| Package | Affected | Fixed in |
|---|---|---|
require-node npm | All versions | 1.3.4 |
require-node npm | All versions | 1.3.4 |
require-node npm | From 2.0.0 | 2.0.4 |
require-node npm | From 2.0.0 | 2.0.4 |
How do I fix GHSA-8j6j-4h2c-c65p?
Upgrade require-node to a fixed version for your release line: 1.3.4 or 2.0.4.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is GHSA-8j6j-4h2c-c65p being exploited?
There is no known exploitation of GHSA-8j6j-4h2c-c65p in the wild and no public exploit code.