Every CVESearch/Get API key

CVE-2017-16226

Sandbox Breakout / Arbitrary Code Execution in static-eval

9.8 CriticalFix available

CVE-2017-16226 is a critical vulnerability (CVSS 9.8) in Static-eval Project Static-eval, published June 7, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.54%, the 89th percentile. Fixed in static-eval 2.0.0.

What does this mean?
Severity
9.8 CriticalCVSS 3.0, NVD
Exploit chance
3.54%EPSS, 89th percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists
Fixed in
2.0.0static-eval

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

3.54%Up 2.1 points since Apr 14, 2021
90%50%10%1%

Affected products

Affected packages

Affected packages
PackageAffectedFixed
static-eval
npm
before 2.0.0
2.0.0

What each source reports

NVD Score used9.8

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.

Record
CVE-2017-16226
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE ListNo score

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.

Record
CVE-2017-16226
Weakness
CWE-20
Updated
2026-11-02
EUVDEUVD-2018-0370No score

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.

Record
EUVD-2018-0370
Updated
2026-11-03
GitHub AdvisoriesGHSA-5mjw-6jrh-hvfqNo score

Sandbox Breakout / Arbitrary Code Execution in static-eval

Affected versions of static-eval pass untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package.

Proof of concept

var evaluate = require('static-eval');
var parse = require('esprima').parse;
var src = '(function(){console.log(process.pid)})()';
var ast = parse(src).body[0].expression;
var res = evaluate(ast, {});
// Will print the process id

Recommendation

Update to version 2.0.0 or later.

Record
GHSA-5mjw-6jrh-hvfq
Weakness
CWE-20
Updated
2026-11-02
OSV9.8

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.

Record
CVE-2017-16226
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-5mjw-6jrh-hvfqNo score

Sandbox Breakout / Arbitrary Code Execution in static-eval

Affected versions of static-eval pass untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package.

Proof of concept

var evaluate = require('static-eval');
var parse = require('esprima').parse;
var src = '(function(){console.log(process.pid)})()';
var ast = parse(src).body[0].expression;
var res = evaluate(ast, {});
// Will print the process id

Recommendation

Update to version 2.0.0 or later.

Record
GHSA-5mjw-6jrh-hvfq
Weakness
CWE-20
Updated
2026-11-02

History

History
RecordedChangedSources
facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

MoveEnter Open