CVE-2017-16226 Sandbox Breakout / Arbitrary Code Execution in static-eval
Untrusted input in the static-eval Node.js module allows access to the global function constructor, enabling arbitrary code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2017-16226?
CVE-2017-16226 is a critical code injection vulnerability in HackerOne static-eval node module node module, published on 7 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The static-eval module is intended to evaluate statically-analyzable expressions. In affected versions, untrusted user input is able to access the global function constructor, effectively allowing arbitrary code execution.
Weakness: CWE-20
Which versions are affected by CVE-2017-16226?
2 open source packages ship an affected version, including static-eval. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
static-eval npm | All versions | 2.0.0 |
static-eval npm | All versions | 2.0.0 |
Products include Static-Eval Project Static-Eval.
How do I fix CVE-2017-16226?
Upgrade static-eval to 2.0.0 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2017-16226 being exploited?
There is no known exploitation of CVE-2017-16226 in the wild and no public exploit code.
Sources
Also known as GHSA-5mjw-6jrh-hvfq.