defaults-deep@0.2.2 vulnerabilities

Like `extend` but recursively copies only the missing properties/values to the target object.

Direct Vulnerabilities

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

How to fix?

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

Fix for free
VulnerabilityVulnerable Version
  • H
Prototype Pollution

defaults-deep is a like extend but recursively copies only the missing properties/values to the target object.

Affected versions of this package are vulnerable to Prototype Pollution. Provided certain input defaults-deep can add or modify properties of the Object prototype. These properties will be present on all objects.

##PoC

var defaultsDeep = require('defaults-deep');
var payload = JSON.parse('{"constructor": {"prototype": {"isAdmin": true}}}');
defaultsDeep({}, payload);
console.log({}.isAdmin); // true

How to fix Prototype Pollution?

There is no fixed version for defaults-deep.

*
  • M
Prototype Pollution

defaults-deep is a like extend but recursively copies only the missing properties/values to the target object.

Affected versions of this package are vulnerable to Prototype Pollution. Affected versions of this package are vulnerable to Prototype Pollution via merging functions. These functions allows a malicious user to modify the prototype of Object via __proto__, causing the addition or modification of an existing property that will exist on all objects.

How to fix Prototype Pollution?

Upgrade defaults-deep to version 0.2.4 or higher.

<0.2.4