GHSA-6jg8-7333-554w Sandbox Breakout in realms-shim

Not scored Published

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.

PackageAffectedFixed in
realms-shim npmAll versions1.2.0
realms-shim npmAll versions1.2.0
ses npmAll versions0.6.3
ses npmAll versions0.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.

Sources

Is GHSA-6jg8-7333-554w in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free