Lodash version 4.17.14 introduces subtle yet noteworthy refinements compared to its predecessor, 4.17.13. Both versions maintain Lodash’s core principle: providing modular JavaScript utilities that streamline development, encompassing everything from array manipulation to object handling and functional programming techniques. Key metadata such as the MIT license, author John-David Dalton, and the Git repository remain consistent, ensuring developer trust and ease of access to the source code.
The most apparent divergence lies in the technical specifications. Version 4.17.14 boasts a slightly larger "unpackedSize" of 1403248 bytes compared to 4.17.13’s 1402106 bytes. This suggests minor additions or alterations to the codebase. Similarly, the "fileCount" increases marginally from 1050 to 1051, indicating a potential addition of a new module or modification of an existing one. Crucially, version 4.17.14 was released on July 10, 2019, shortly after 4.17.13 on July 9, 2019 demonstrating active maintenance and iterative improvement.
For developers, these changes, while seemingly small, signify continuous refinement and bug fixes within the library. While the core functionalities remain consistent, upgrading to 4.17.14 ensures users benefit from the latest optimizations and potential security patches. Developers should consult the Lodash changelog for a detailed breakdown of the specific changes introduced in version 4.17.14 for detailed information, but in general benefit from a more polished and robust utility library.
All the vulnerabilities related to the version 4.17.14 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.