Prototype Pollution in lodash.mergewith
Summary
GHSA-779f-wgxg-qr8f: Prototype Pollution in lodash.mergewith. Affects lodash.mergewith versions < 4.6.2. Fixed in 4.6.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package lodash.mergewith is a utility library for JavaScript that provides functions for merging objects. It is commonly used in web development projects to simplify object manipulation and merging tasks. However, versions of lodash.mergewith before 4.6.2 are vulnerable to a security issue known as prototype pollution.
Vulnerability Detail
Prototype pollution is a vulnerability that occurs when an attacker can modify the prototype of an object. In the case of lodash.mergewith, the function mergeWith allows a malicious user to modify the prototype of the Object via {constructor: {prototype: {...}}}. This can lead to the addition or modification of existing properties that will affect all objects. The impact of this vulnerability can range from unexpected behavior and data corruption to potential remote code execution.
How To Fix
Minimum fixed version
4.6.2
This is the first release that contains the fix.
npm install lodash.mergewith@4.6.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed version of the package to mitigate the risk.
Conclusion
The vulnerability in lodash.mergewith can lead to prototype pollution, allowing an attacker to modify the prototype of an object. To mitigate this risk, it is crucial to update to version 4.6.2 or later of the package. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for lodash.mergewith →
FAQ
Prototype pollution is a vulnerability that allows an attacker to modify the prototype of an object, leading to unexpected behavior and potential security issues.
lodash.mergewith is a utility library for JavaScript that provides functions for merging objects. It is commonly used in web development projects.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and it will provide real-time alerts for open-source vulnerabilities.
Yes, updating to version 4.6.2 or later of lodash.mergewith will fix this vulnerability.
The consequences of this vulnerability can range from unexpected behavior and data corruption to potential remote code execution, depending on how it is exploited.
References
Related vulnerabilities
Recent vulnerabilities recorded for lodash.mergewith.