Executive brief
lodash.mergewith is a JavaScript utility function used to merge objects in web applications. Affected versions allow an attacker to inject malicious properties into the prototype of all objects, potentially compromising application behavior, data integrity, and security controls that rely on object properties.
Technical details
Prototype pollution vulnerability in lodash.mergewith (versions before 4.6.2) allows an attacker to modify the Object prototype via a crafted input object with a {constructor: {prototype: {...}}} structure. This occurs because the mergeWith function recursively merges user-supplied objects without sufficient restrictions on property manipulation. The attack requires only that an application calls mergeWith with untrusted data; network access and authentication are not barriers. A successful exploit can add or modify properties on all objects in the application, leading to authorization bypass, logic errors, or denial of service. The fix is available in version 4.6.2 and later.
Affected products
- lodash mergewith before 4.6.2
Timeline
- 2020-09-03: disclosed