GHSA-6jg8-7333-554w Sandbox Breakout in realms-shim
An attacker can escape the sandbox and execute arbitrary code by exploiting a flaw in the Reflect.construct implementation within the realms-shim library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-6jg8-7333-554w?
GHSA-6jg8-7333-554w is a code injection vulnerability in realms-shim, published on 4 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Which versions are affected by GHSA-6jg8-7333-554w?
4 open source packages ship an affected version, including realms-shim and ses.
| Package | Affected | Fixed in |
|---|---|---|
realms-shim npm | All versions | 1.2.0 |
realms-shim npm | All versions | 1.2.0 |
ses npm | All versions | 0.6.3 |
ses npm | All versions | 0.6.3 |
How do I fix GHSA-6jg8-7333-554w?
Upgrade realms-shim to 1.2.0 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is GHSA-6jg8-7333-554w being exploited?
There is no known exploitation of GHSA-6jg8-7333-554w in the wild and no public exploit code.