Lodash.merge is a utility function, part of the popular Lodash library, designed for deep merging objects. Version 2.4.0 offers a subtle yet crucial update over its predecessor, version 2.3.0. The primary difference lies in the refined dependencies. Both versions rely on a suite of internal Lodash functions like lodash._basecreatecallback, lodash._basemerge, lodash._getarray, lodash.isobject, lodash._releasearray, and lodash._slice. However, version 2.4.0 advances these dependencies to their "~2.4.0" counterparts, while version 2.3.0 uses "~2.3.0". This indicates that version 2.4.0 incorporates potential bug fixes, performance improvements, or minor feature enhancements within those internal Lodash modules.
For developers, this means upgrading to version 2.4.0 is recommended to leverage these underlying improvements and ensure better stability and potential performance benefits for the _.merge function. The core functionality of _.merge remains consistent: recursively merging properties of source objects into the destination object. Developers who depend on Lodash's _.merge for handling complex object configurations, data aggregation, or state management should consider the upgrade to benefit from the cumulative enhancements within the Lodash ecosystem. Both versions share the same MIT license and author, John-David Dalton, indicating a commitment to open-source and community-driven development. The modules were generated using lodash-cli, reflecting Lodash's modular approach.
All the vulnerabilities related to the version 2.4.0 of the package
Prototype Pollution in lodash.merge
Versions of lodash.merge
before 4.6.1 are vulnerable to Prototype Pollution. The function 'merge' may allow 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.
Update to version 4.6.1 or later.
Prototype Pollution in lodash.merge
Versions of lodash.merge
before 4.6.2 are vulnerable to prototype pollution. The function merge
may allow a malicious user to modify the prototype of Object
via {constructor: {prototype: {...}}}
causing the addition or modification of an existing property that will exist on all objects.
Update to version 4.6.2 or later.