Lodash-es version 4.17.15 represents a subtle but potentially impactful update to the popular utility library, succeeding version 4.17.14. Both versions provide Lodash's comprehensive toolkit of functions as ES modules, making them easily integrated into modern JavaScript projects leveraging module bundlers like Webpack or Parcel for optimized delivery and tree-shaking. Key improvements include a slightly reduced unpacked size from of 631273 to 629054, and a minor fileCount reduction from 647 to 645. This indicates potential optimizations in the module structure or code, which can lead to slightly faster load times and reduced bundle sizes for applications importing Lodash-es.
Developers who rely on Lodash for common tasks like array manipulation, object operations, and functional programming utilities should consider upgrading to version 4.17.15. While the core functionality remains the same, the reduced footprint benefits performance-sensitive applications. The library maintainer, John-David Dalton, ensures ongoing quality and stability, making lodash-es a reliable choice for simplifying complex JavaScript logic. The MIT license guarantees flexibility for both open-source and commercial projects. The shift in release date (4.17.14 on 2019-07-10 vs 4.17.15 on 2019-07-19) marks the newer version and an interval for bug fixes and optimizations.
All the vulnerabilities related to the version 4.17.15 of the package
Prototype Pollution in lodash
Versions of lodash prior to 4.17.19 are vulnerable to Prototype Pollution. The functions pick
, set
, setWith
, update
, updateWith
, and zipObjectDeep
allow a malicious user to modify the prototype of Object if the property identifiers are user-supplied. Being affected by this issue requires manipulating objects based on user-provided property values or arrays.
This vulnerability causes the addition or modification of an existing property that will exist on all objects and may lead to Denial of Service or Code Execution under specific circumstances.
Regular Expression Denial of Service (ReDoS) in lodash
All versions of package lodash prior to 4.17.21 are vulnerable to Regular Expression Denial of Service (ReDoS) via the toNumber
, trim
and trimEnd
functions.
Steps to reproduce (provided by reporter Liyuan Chen):
var lo = require('lodash');
function build_blank(n) {
var ret = "1"
for (var i = 0; i < n; i++) {
ret += " "
}
return ret + "1";
}
var s = build_blank(50000) var time0 = Date.now();
lo.trim(s)
var time_cost0 = Date.now() - time0;
console.log("time_cost0: " + time_cost0);
var time1 = Date.now();
lo.toNumber(s) var time_cost1 = Date.now() - time1;
console.log("time_cost1: " + time_cost1);
var time2 = Date.now();
lo.trimEnd(s);
var time_cost2 = Date.now() - time2;
console.log("time_cost2: " + time_cost2);
Command Injection in lodash
lodash
versions prior to 4.17.21 are vulnerable to Command Injection via the template function.