GHSA-jp99-5h8w-gmxc Sandbox Breakout / Arbitrary Code Execution in @zhaoyao91/eval-in-vm

Not scored Published

Attackers can escape the sandbox and execute arbitrary code by accessing the main context via constructor chaining in the eval-in-vm package.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is GHSA-jp99-5h8w-gmxc?

GHSA-jp99-5h8w-gmxc is a code injection vulnerability in @zhaoyao91/eval-in-vm, published on 4 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

All versions of @zhaoyao91/eval-in-vm are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to restrict access to the main context through this.constructor.constructor . This may allow attackers to execute arbitrary code in the system. Evaluating the payload this.constructor.constructor('return process.env')() prints the contents of process.env.

Recommendation

No fix is currently available. Consider using an alternative package until a fix is made available.

Which versions are affected by GHSA-jp99-5h8w-gmxc?

2 open source packages ship an affected version, including @zhaoyao91/eval-in-vm.

PackageAffectedFixed in
@zhaoyao91/eval-in-vm npmFrom 0.0.0None
@zhaoyao91/eval-in-vm npmFrom 0.0.0None

How do I fix GHSA-jp99-5h8w-gmxc?

No fix has been published for GHSA-jp99-5h8w-gmxc yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is GHSA-jp99-5h8w-gmxc being exploited?

There is no known exploitation of GHSA-jp99-5h8w-gmxc in the wild and no public exploit code.

Sources

Is GHSA-jp99-5h8w-gmxc in your software?

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

Check your SBOMs for free