CVE-2020-7640: OS Command Injection in pixl-class
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77048%
CWE
Published
12/10/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
pixl-class | npm | < 1.0.3 | 1.0.3 |
Vulnerability Intelligence
Miggo AI
Root 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.