Sandbox Breakout / Arbitrary Code Execution in safer-eval
Critical severity
GitHub Reviewed
Published
Oct 21, 2019
to the GitHub Advisory Database
•
Updated Feb 1, 2023
Description
Published by the National Vulnerability Database
Oct 15, 2019
Reviewed
Oct 17, 2019
Published to the GitHub Advisory Database
Oct 21, 2019
Last updated
Feb 1, 2023
Versions of
safer-eval
prior to 1.3.4 are vulnerable to Sandbox Escape leading to Remote Code Execution. A payload using constructor properties can escape the sandbox and execute arbitrary code. For example, evaluating he stringconsole.constructor.constructor('return process')().env
printsprocess.env
to the console.Recommendation
Upgrade to version 1.3.4 or later.
References