CVE-2017-16226 Sandbox Breakout / Arbitrary Code Execution in static-eval

Critical 9.8 Published Updated

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.

PackageAffectedFixed in
static-eval npmAll versions2.0.0
static-eval npmAll versions2.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.

Is CVE-2017-16226 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free