Miggo Logo

CVE-2020-7640: OS Command Injection in pixl-class

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.77048%
Published
12/10/2021
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
pixl-classnpm< 1.0.31.0.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from how the create function handles the 'members.__parent' property. In vulnerable versions (<1.0.3), it extracts code from __parent.toString(), builds a constructor string via concatenation, and executes it with eval(). This allows attackers to control the executed code by crafting malicious __parent values. The patch in 1.0.3 replaces this dangerous eval() pattern with Function.prototype.apply() for safe inheritance, confirming the vulnerability location. The Snyk POC and commit diff directly implicate this code path.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

pixl-*l*ss prior to *.*.* *llows *x**ution o* *r*itr*ry *omm*n*s. T** m*m**rs *r*um*nt o* t** *r**t* *un*tion **n ** *ontroll** *y us*rs wit*out *ny s*nitiz*tion.

Reasoning

T** vuln*r**ility st*ms *rom *ow t** *r**t* *un*tion **n*l*s t** 'm*m**rs.__p*r*nt' prop*rty. In vuln*r**l* v*rsions (<*.*.*), it *xtr**ts *o** *rom __p*r*nt.toStrin*(), *uil*s * *onstru*tor strin* vi* *on**t*n*tion, *n* *x**ut*s it wit* *v*l(). T*is