GHSA-hrpq-r399-whgw

    Dashboard / Vulnerabilities / GHSA-hrpq-r399-whgw

    GHSA-hrpq-r399-whgw

    Published: 25 Aug 2020Last Modified: 13 Mar 2026
    Aliases:

    Summary: Sandbox Breakout / Arbitrary Code Execution in safe-eval

    Details: All versions of `safe-eval` are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to restrict access to the main context through Error objects. This may allow attackers to execute arbitrary code in the system. Evaluating the payload ```js (function (){ var ex = new Error ex.__proto__ = null ex.stack = { match: x => { return x.constructor.constructor("throw process.env")() } } return ex })() ``` prints the contents of `process.env`. ## Recommendation No fix is currently available. Consider using an alternative package until a fix is made available.

    Affected packages

    Package

    Name: safe-eval

    Purl: pkg:npm/safe-eval

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -None

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-hrpq-r399-whgw | CVE-DB