static-eval
Affected
- introduced
0, fixed2.0.0(semver)
Fixed versions
2.0.0
Fix
- Fixed version
2.0.0npm install [email protected]
Advisory
Also known as: CVE-2017-16226
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.
Medium Basis: The source's own band: MODERATE
0, fixed 2.0.0 (semver)2.0.0
2.0.0npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0