GHSA-7cg8-pq9v-x98q: Realms shim Sandbox Breakout Vulnerability
CRITICALGHSA-7cg8-pq9v-x98q 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.1.
GHSA-7cg8-pq9v-x98q at a Glance
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).
How to Fix GHSA-7cg8-pq9v-x98q
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.
npm install realms-shim@1.2.1
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-7cg8-pq9v-x98q, 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.1), 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
GHSA-7cg8-pq9v-x98q Affected Realms shim Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
realms-shim
|
npm |
< 1.2.1
|
1.2.1
|
References
Frequently Asked Questions
What is GHSA-7cg8-pq9v-x98q?
Which Realms shim versions are affected?
What version fixes GHSA-7cg8-pq9v-x98q?
Is realms-shim affected?
What is the CVSS score of GHSA-7cg8-pq9v-x98q?
What CWE is associated with GHSA-7cg8-pq9v-x98q?
How can I check npm dependencies for GHSA-7cg8-pq9v-x98q?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7cg8-pq9v-x98q",
"modified" : "2021-09-02T21:14:19Z",
"published" : "2019-10-21T21:58:55Z",
"aliases" : [ ],
"summary" : "Sandbox Breakout in realms-shim",
"details" : "Versions of `realms-shim` prior to 1.2.1 are vulnerable to a Sandbox Breakout. The Realms evaluation function has an option to apply Babel-like transformations to the source code before it reaches the evaluator. One portion of this transform pipeline exposed a primal-Realm object to the rewriting function. Confined code which used the evaluator itself could provide a malicious rewriter function that captured this object, and use it to breach the sandbox.\n\n\n## Recommendation\n\nUpgrade to version 1.2.1 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.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Agoric/realms-shim/security/advisories/GHSA-7cg8-pq9v-x98q"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Agoric/realms-shim"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-7cg8-pq9v-x98q"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-REALMSSHIM-536069"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1218"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:22:25Z",
"nvd_published_at" : null
}
}