org.webjars.npm:object-path@0.11.4 vulnerabilities

  • latest version

    0.11.4

  • first published

    9 years ago

  • latest version published

    5 years ago

  • licenses detected

  • package manager

Direct Vulnerabilities

Known vulnerabilities in the org.webjars.npm:object-path 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

org.webjars.npm:object-path is a package to access deep properties using a path

Affected versions of this package are vulnerable to Prototype Pollution. A prototype pollution vulnerability exists in del(), empty(), push(), insert() functions when using the "inherited props" mode (e.g. when a new object-path instance is created with the includeInheritedProps option set to true, or when using the withInheritedProps default instance).

To help with preventing this type of vulnerability in the client code, also the get() function will now throw an exception if an object's magic properties are accessed. The vulnerability does not exist in the default instance exposed by object path (e.g objectPath.del()) if using version >= 0.11.0.

How to fix Prototype Pollution?

A fix was pushed into the master branch but not yet published.

[0.11.0,)
  • M
Prototype Pollution

org.webjars.npm:object-path is a package to access deep properties using a path

Affected versions of this package are vulnerable to Prototype Pollution. A type confusion vulnerability can lead to a bypass of CVE-2020-15256 when the path components used in the path parameter are arrays. In particular, the condition currentPath === '__proto__' returns false if currentPath is ['__proto__']. This is because the === operator returns always false when the type of the operands is different.

PoC

const objectPath = require('object-path');

objectPath.withInheritedProps.set({}, [['__proto__'], 'polluted'], 'yes');
console.log(polluted); // yes

How to fix Prototype Pollution?

There is no fixed version for org.webjars.npm:object-path.

[0,)
  • H
Prototype Pollution

org.webjars.npm:object-path is a package to access deep properties using 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 org.webjars.npm:object-path to version 0.11.5 or higher.

[,0.11.5)