Sandbox Escaping Affecting safe-eval package, versions <0.4.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (70th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDnpm:safe-eval:20170830
  • published6 Sept 2017
  • disclosed30 Aug 2017
  • creditAlessandro Nadalin

Introduced: 30 Aug 2017

CVE-2017-16088  (opens in a new tab)
CWE-265  (opens in a new tab)

How to fix?

Upgrade safe-eval to version 0.4.0 or higher.

Overview

[safe-eval] is a version of eval, claiming to be safer.

Affected versions of this package are vulnerable to Sandbox Escaping. User input is not sanitized before being passed on to the safeEval function. A malicious user could access the object constructors, allowing access to the standard library, then escaping the sandbox.

Proof of Concept:

var safeEval = require('safe-eval');
safeEval("this.constructor.constructor('return process')().exit()");

CVSS Scores

version 3.1