# GHSA-7cg8-pq9v-x98q: Sandbox Breakout in realms-shim

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2019-10-21T21:58:55.000Z
- Modified: 2021-09-02T21:14:19.000Z

## Description

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.


## Recommendation

Upgrade to version 1.2.1 or later.

(As written by GitHub Advisory Database.)

## Affected

- realms-shim (npm): before 1.2.1

## References

- <https://github.com/Agoric/realms-shim/security/advisories/GHSA-7cg8-pq9v-x98q> (web)
- <https://github.com/Agoric/realms-shim> (package)
- <https://github.com/advisories/GHSA-7cg8-pq9v-x98q> (advisory)
- <https://snyk.io/vuln/SNYK-JS-REALMSSHIM-536069> (web)
- <https://www.npmjs.com/advisories/1218> (web)

## Sources

- GitHub Advisory Database: [GHSA-7cg8-pq9v-x98q](https://github.com/advisories/GHSA-7cg8-pq9v-x98q), CC-BY-4.0, modified 2021-09-02

---

Page: https://cve.day/GHSA-7cg8-pq9v-x98q · Whole record: https://cve.day/GHSA-7cg8-pq9v-x98q.json · Rebuilt by cve.day 2026-11-25T22:56:44.526Z
