the function deepFromFlat of underscore.deep is vulnerable to prototype pollution in clever/underscore.deep
Feb 2nd 2022
Prototype Pollution in Clever/underscore.deep
Reported on Feb 2nd 2022 | Timothee Desurmont
Vulnerability type: CWE-1321
Version 0.5.1 of underscore.deep is vulnerable to prototype pollution; the function deepFromFlat in underscore.deep.js do not check if the attribute resolves to the object prototype.
By adding or modifying attributes of an object prototype, it is possible to create attributes that exist on every object, or replace critical attributes with malicious ones.
This can be problematic if the software depends on existence or non-existence of certain attributes, or uses pre-defined attributes of object prototype (such as hasOwnProperty, toString or valueOf).
|Integrity||An attacker can inject attributes that are used in other components.|
|Availability||An attacker can override existing attributes with ones that have incompatible type, which may lead to a crash.|