GHSA-ww6v-677g-p656

    Dashboard / Vulnerabilities / GHSA-ww6v-677g-p656

    GHSA-ww6v-677g-p656

    Published: 18 Jul 2018Last Modified: 8 Nov 2023

    Summary: Sandbox Breakout in safe-eval

    Details: Affected versions of `safe-eval` are vulnerable to a sandbox escape. By accessing object constructors, un-sanitized user input can access the entire standard library and effectively break out of the sandbox. ## Proof of Concept: This code accesses the process object and calls `.exit()` ```js var safeEval = require('safe-eval'); safeEval("this.constructor.constructor('return process')().exit()"); ``` ## Recommendation Update to version 0.4.0 or later

    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