We found results for “


Date: November 15, 2020


Prototype pollution vulnerability in 'controlled-merge' versions 1.0.0 through 1.2.0 allows attacker to cause a denial of service and may lead to remote code execution.


The NPM module 'controlled-merge' can be abused by Prototype Pollution vulnerability since the function 'merge()' does not check for the type of object before assigning value to the property. Due to this flaw an attacker could create a non-existent property or able to manipulate the property which leads to Denial of Service or potentially Remote code execution.

PoC Details

The `merge()` function accepts `obj1, obj2, attr` arguments. Due to the absence of validation, at values passed into `obj2, attr` an attacker can supply a malicious value by adjusting the `attr` value to include the `prototype` property. Since there is no validation before assigning property to check whether the assigned `attr` is the Object's own property or not, the property `status` will be directly be assigned to the empty obj({}) thereby polluting the Object prototype. Later in the code, if there is a check to validate `status` the valued would be substituted as "pwned!" as it had been polluted.

PoC Code

var merge = require('controlled-merge');
var obj = merge({}, JSON.parse('{ "testProperty": "hi", "prototype" : { "status" : "pwned!" } }'), true);

Affected Environments



Upgrade to version 1.3.0

Language: JS

Good to know:


Input Validation


Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')


Upgrade Version

Upgrade to version controlled-merge - 1.3.0

Learn More

Base Score:
Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope (S): Unchanged
Confidentiality (C): None
Integrity (I): None
Availability (A): High
Base Score:
Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (AU): None
Confidentiality (C): None
Integrity (I): None
Availability (A): Partial
Additional information: