object-path-set@0.0.2 vulnerabilities

set values in javascript objects by specifying a path

Direct Vulnerabilities

Known vulnerabilities in the object-path-set 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
  • H
Prototype Pollution

object-path-set is a set values in javascript objects by specifying a path

Affected versions of this package are vulnerable to Prototype Pollution via the setPath method, as it allows an attacker to merge object prototypes into it.

Note:
This vulnerability derives from an incomplete fix in https://security.snyk.io/vuln/SNYK-JS-OBJECTPATHSET-607908

How to fix Prototype Pollution?

Upgrade object-path-set to version 1.0.2 or higher.

<1.0.2
  • H
Prototype Pollution

object-path-set is a set values in javascript objects by specifying a path

Affected versions of this package are vulnerable to Prototype Pollution. The setPath function can be used to add/modify properties of the Object prototype.

PoC

const setPath = require('object-path-set');
const obj = {};
console.log("Before : " + obj.polluted);
setPath({}, '__proto__.polluted', 'yes');
console.log("After : " + obj.polluted);

How to fix Prototype Pollution?

Upgrade object-path-set to version 1.0.1 or higher.

<1.0.1