VDB
Sign up
CRITICAL10.0

GHSA-ww6v-677g-p656

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

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/safe-eval
Introduced in: 0

No fixed version published yet for safe-eval (npm). Pin to a known-safe version or switch to an alternative.

References