Arbitrary Code Execution Affecting pixl-class package, versions <1.0.3


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.41% (75th 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 Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-PIXLCLASS-564968
  • published9 Apr 2020
  • disclosed10 Mar 2020
  • creditJHU System Security Lab

Introduced: 10 Mar 2020

CVE-2020-7640  (opens in a new tab)
CWE-78  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade pixl-class to version 1.0.3 or higher.

Overview

pixl-class is a library that allows you to create classes in a more classical sort of way, including support for static class members, proper constructors, inheritance, and mixins.

Affected versions of this package are vulnerable to Arbitrary Code Execution. The injection point is located in line 26 in the index file class.js; the members argument of the create function can be controlled by users without any sanitization.

POC

var a = require("pixl-class");
var members = {
  __parent:'function(){}; console.log(123)//}'
}

a.create(members);

CVSS Scores

version 3.1