GHSA-6jg8-7333-554w: Realms shim Sandbox Breakout Vulnerability

CRITICAL
CVSS 9.8
Published
Advisory Summary

GHSA-6jg8-7333-554w is a CRITICAL (CVSS 9.8) sandbox breakout vulnerability (General Security Weakness) affecting Realms shim libraries in the npm ecosystem. The issue involves sandbox breakout in realms-shim. Remediation is available by upgrading affected packages to version 1.2.0, 0.6.3.

GHSA-6jg8-7333-554w at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6jg8-7333-554w
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification General Security Weakness
Affected Product Realms shim
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-6jg8-7333-554w

To remediate this vulnerability, upgrade all affected Realms shim dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

realms-shim fixed: 1.2.0
npm install realms-shim@1.2.0
ses fixed: 0.6.3
npm install ses@0.6.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls realms-shim

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-6jg8-7333-554w, inspect your project dependencies using npm:

npm ls realms-shim

Analyze the terminal output to locate any version of Realms shim in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.

Note: The npm ls realms-shim command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Realms shim, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Versions of `realms-shim` prior to 1.2.0 are vulnerable to a Sandbox Breakout. `Reflect.construct` can be used on the sandboxed Function constructor to reach the prototypes of the primal Realm, which may allow an attacker to escape the sandbox and execute arbitrary code. ## Recommendation Upgrade to version 1.2.0 or later.

GHSA-6jg8-7333-554w Affected Realms shim Versions

2 component(s)
Fixed Versions:
1.2.00.6.3
Product / Package Ecosystem Affected Versions Fixed Version
realms-shim
npm
< 1.2.0
1.2.0
ses
npm
< 0.6.3
0.6.3

References

Frequently Asked Questions

What is GHSA-6jg8-7333-554w?
GHSA-6jg8-7333-554w is a security vulnerability in Realms shim involving Sandbox Breakout in realms-shim under General Security Weakness.
Which Realms shim versions are affected?
Affected versions include releases prior to 1.2.0, 0.6.3 across affected packages: realms-shim, ses.
What version fixes GHSA-6jg8-7333-554w?
Upgrading to 1.2.0, 0.6.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is realms-shim affected?
Yes, realms-shim is affected in releases prior to 1.2.0. Upgrade your dependency to 1.2.0 or later.
Is ses affected?
Yes, ses is affected in releases prior to 0.6.3. Upgrade your dependency to 0.6.3 or later.
What is the CVSS score of GHSA-6jg8-7333-554w?
GHSA-6jg8-7333-554w has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-6jg8-7333-554w?
GHSA-6jg8-7333-554w is classified under General Security Weakness.
How can I check npm dependencies for GHSA-6jg8-7333-554w?
Run the dependency tree command: 'npm ls realms-shim'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6jg8-7333-554w",
  "modified" : "2021-09-02T16:40:48Z",
  "published" : "2019-10-04T17:56:12Z",
  "aliases" : [ ],
  "summary" : "Sandbox Breakout in realms-shim",
  "details" : "Versions of `realms-shim` prior to 1.2.0 are vulnerable to a Sandbox Breakout. `Reflect.construct` can be used on the sandboxed Function constructor to reach the prototypes of the primal Realm, which may allow an attacker to escape the sandbox and execute arbitrary code.\n\n\n## Recommendation\n\nUpgrade to version 1.2.0 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "realms-shim"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "ses"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Agoric/realms-shim/security/advisories/GHSA-6jg8-7333-554w"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Agoric/realms-shim"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-6jg8-7333-554w"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-REALMSSHIM-471680"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1180"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1181"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1182"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1190"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1191"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:19:30Z",
    "nvd_published_at" : null
  }
}