jointjs@3.1.0 vulnerabilities

JavaScript diagramming library

Direct Vulnerabilities

Known vulnerabilities in the jointjs package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Prototype Pollution

jointjs is a JavaScript diagramming library. It can be used to create either static diagrams or, and more importantly, fully interactive diagramming tools and application builders.

Affected versions of this package are vulnerable to Prototype Pollution. A type confusion vulnerability can lead to a bypass of CVE-2020-28480 when the user-provided keys used in the path parameter are arrays in the setByPath function.

PoC

const jointjs = require("jointjs");

// jointjs.util.setByPath({}, '__proto__/polluted', 'yes');
// jointjs.util.setByPath({}, ['__proto__', 'polluted'], 'yes');
// console.log(polluted); // ReferenceError: polluted is not defined

jointjs.util.setByPath({}, [['__proto__'], 'polluted'], 'yes');
console.log(polluted); // yes

How to fix Prototype Pollution?

Upgrade jointjs to version 3.4.2 or higher.

<3.4.2
  • M
Denial of Service (DoS)

jointjs is a JavaScript diagramming library. It can be used to create either static diagrams or, and more importantly, fully interactive diagramming tools and application builders.

Affected versions of this package are vulnerable to Denial of Service (DoS) via the unsetByPath function.

How to fix Denial of Service (DoS)?

Upgrade jointjs to version 3.3.0 or higher.

<3.3.0
  • H
Prototype Pollution

jointjs is a JavaScript diagramming library. It can be used to create either static diagrams or, and more importantly, fully interactive diagramming tools and application builders.

Affected versions of this package are vulnerable to Prototype Pollution via util.setByPath (https://resources.jointjs.com/docs/jointjs/v3.2/joint.html#util.setByPath). The path used the access the object's key and set the value is not properly sanitized, leading to a Prototype Pollution.

PoC

const jointjs = require("jointjs");

const obj = {};
console.log("Before : " + obj.polluted);
jointjs.util.setByPath({ }, '__proto__/polluted', "yes", '/');
// jointjs.util.setByPath({ }, 'constructor/prototype/polluted', "yes", '/');
console.log("After : " + obj.polluted);

How to fix Prototype Pollution?

Upgrade jointjs to version 3.3.0 or higher.

<3.3.0