Miggo Logo

CVE-2019-10769:
Sandbox Breakout / Arbitrary Code Execution in safer-eval

9.8

CVSS Score

Basic Information

EPSS Score
-
Published
12/11/2019
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
safer-evalnpm<= 1.3.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from saferEval's inability to properly restrict access to the main execution context. The PoC demonstrates prototype pollution via Buffer.prototype.write and constructor.constructor chaining to access the 'process' object. Since saferEval is explicitly designed as the package's main evaluation entry point and the advisory states the package isn't suitable for user input processing, this function directly enables the sandbox escape when processing untrusted input.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*ll v*rsions o* `s***r-*v*l` *r* vuln*r**l* to S*n**ox *s**p* l***in* to R*mot* *o** *x**ution. T** p**k*** **ils to r*stri*t ****ss to t** m*in *ont*xt *n* is not suit** to pro**ss *r*itr*ry us*r input. T*is m*y *llow *tt**k*rs to *x**ut* *r*itr*ry

Reasoning

T** vuln*r**ility st*ms *rom s***r*v*l's in**ility to prop*rly r*stri*t ****ss to t** m*in *x**ution *ont*xt. T** Po* **monstr*t*s prototyp* pollution vi* *u***r.prototyp*.writ* *n* *onstru*tor.*onstru*tor ***inin* to ****ss t** 'pro**ss' o*j**t. Sin