Skip to content

fix(deps): update dependency lodash to v4 [security] #3886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ScriptedAlchemy
Copy link
Member

This PR contains the following updates:

Package Type Update Change
lodash (source) dependencies major ^3.10.1 -> ^4.0.0

Prototype Pollution in lodash

CVE-2018-3721 / GHSA-fvqr-27wr-82fm

More information

Details

Versions of lodash before 4.17.5 are vulnerable to prototype pollution.

The vulnerable functions are 'defaultsDeep', 'merge', and 'mergeWith' which 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.

Recommendation

Update to version 4.17.5 or later.

Severity

  • CVSS Score: 6.5 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Regular Expression Denial of Service (ReDoS) in lodash

CVE-2019-1010266 / GHSA-x5rq-j2xg-h7qm / SNYK-JS-LODASH-73639

More information

Details

lodash prior to 4.7.11 is affected by: CWE-400: Uncontrolled Resource Consumption. The impact is: Denial of service. The component is: Date handler. The attack vector is: Attacker provides very long strings, which the library attempts to match using a regular expression. The fixed version is: 4.7.11.

Severity

Moderate

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Prototype Pollution in lodash

CVE-2018-16487 / GHSA-4xc9-xhrj-v574

More information

Details

Versions of lodash before 4.17.11 are vulnerable to prototype pollution.

The vulnerable functions are 'defaultsDeep', 'merge', and 'mergeWith' which 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.

Recommendation

Update to version 4.17.11 or later.

Severity

High

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Prototype Pollution in lodash

CVE-2019-10744 / GHSA-jf85-cpcp-j695 / SNYK-JS-LODASH-450202

More information

Details

Versions of lodash before 4.17.12 are vulnerable to Prototype Pollution. The function defaultsDeep allows 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.

Recommendation

Update to version 4.17.12 or later.

Severity

  • CVSS Score: 9.1 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Prototype Pollution in lodash

CVE-2020-8203 / GHSA-p6mc-m468-83gw

More information

Details

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.

Severity

  • CVSS Score: 7.4 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Regular Expression Denial of Service (ReDoS) in lodash

CVE-2020-28500 / GHSA-29mw-wpgm-hmr9 / SNYK-JAVA-ORGFUJIONWEBJARS-1074896 / SNYK-JAVA-ORGWEBJARS-1074894 / SNYK-JAVA-ORGWEBJARSBOWER-1074892 / SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074895 / SNYK-JAVA-ORGWEBJARSNPM-1074893 / SNYK-JS-LODASH-1018905

More information

Details

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);

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Command Injection in lodash

CVE-2021-23337 / GHSA-35jh-r3h4-6jhm / SNYK-JAVA-ORGFUJIONWEBJARS-1074932 / SNYK-JAVA-ORGWEBJARS-1074930 / SNYK-JAVA-ORGWEBJARSBOWER-1074928 / SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931 / SNYK-JAVA-ORGWEBJARSNPM-1074929 / SNYK-JS-LODASH-1040724

More information

Details

lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.

Severity

  • CVSS Score: 7.2 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

lodash/lodash (lodash)

v4.17.21

Compare Source

v4.17.20

Compare Source

v4.17.16

Compare Source

v4.17.15

Compare Source

v4.17.14

Compare Source

v4.17.13

Compare Source

v4.17.12

Compare Source

v4.17.11

Compare Source

v4.17.10

Compare Source

v4.17.9

Compare Source

v4.17.5

Compare Source

v4.17.4

Compare Source

v4.17.3

Compare Source

v4.17.2

Compare Source

v4.17.1

Compare Source

v4.17.0

Compare Source

v4.16.6

Compare Source

v4.16.5

Compare Source

v4.16.4

Compare Source

v4.16.3

Compare Source

v4.16.2

Compare Source

v4.16.1

Compare Source

v4.16.0

Compare Source

v4.15.0

Compare Source

v4.14.2

Compare Source

v4.14.1

Compare Source

v4.14.0

Compare Source

v4.13.1

Compare Source

v4.13.0

Compare Source

v4.12.0

Compare Source

v4.11.2

Compare Source

v4.11.1

Compare Source

v4.11.0

Compare Source

v4.10.0

Compare Source

v4.9.0

Compare Source

v4.8.2

Compare Source

v4.8.1

Compare Source

v4.8.0

Compare Source

v4.7.0

Compare Source

v4.6.1

Compare Source

v4.6.0

Compare Source

v4.5.1

Compare Source

v4.5.0

Compare Source

v4.4.0

Compare Source

v4.3.0

Compare Source

v4.2.1

Compare Source

v4.2.0

Compare Source

v4.1.0

Compare Source

v4.0.1

Compare Source

v4.0.0

Compare Source

lodash v4.0.0

2015 was big year! Lodash became the most depended on npm package, passed 1 billion downloads, & its v3 release saw massive adoption!

The year was also one of collaboration, as discussions began on merging Lodash & Underscore. Much of Lodash v4 is proofing out the ideas from those discussions. Lodash v4 would not be possible without the collaboration & contributions of the Underscore core team. In the spirit of merging our teams have blended with several members contributing to both libraries.

For 2016 & lodash v4.0.0 we wanted to cut loose, push forward, & take things up a notch!

Modern only

With v4 we’re breaking free from old projects, old environments, & dropping old IE < 9 support!

4 kB Core

Lodash’s kitchen-sink size will continue to grow as new methods & functionality are added. However, we now offer a 4 kB (gzipped) core build that’s compatible with Backbone v1.2.4 for folks who want Lodash without lugging around the kitchen sink.

More ES6

We’ve continued to embrace ES6 with methods like _.isSymbol, added support for cloning & comparing array buffers, maps, sets, & symbols, converting iterators to arrays, & iterable _(…).

In addition, we’ve published an es-build & pulled babel-plugin-lodash into core to make tree-shaking a breeze.

More Modular

Pop quiz! 📣

What category path does the bindAll method belong to? Is it

A) require('lodash/function/bindAll')
B) require('lodash/utility/bindAll')
C) require('lodash/util/bindAll')

Don’t know? Well, with v4 it doesn’t matter because now module paths are as simple as

var bindAll = require('lodash/bindAll');

We’ve also reduced module complexity making it easier to create smaller bundles. This has helped Lodash adoption with libraries like Async & Redux!

1st Class FP

With v3 we introduced lodash-fp. We learned a lot & with v4 we decided to pull it into core.

Now you can get immutable, auto-curried, iteratee-first, data-last methods as simply as

var _ = require('lodash/fp');
var object = { 'a': 1 };
var source = { 'b': 2 };
var newObject = _.assign(source)(object);

console.log(newObject);
// => { 'a': 1, 'b': 2 }

console.log(object);
// => { 'a': 1 }

var convert = require('lodash/fp/convert');
var assign = convert('assign', require('lodash.assign'));
// works too!

Chakra Optimized

Well actually, while we’re excited about Chakra, Lodash is optimized for great performance across all engines. Unlike many libraries, we don’t favor a single engine so we can deliver solid performance & support regardless of engine.

With v4 we’ve continued our commitment to performance; expanding support for lazy evaluation & improving the performance of core functionality like circular reference detection.

Emojis

Taking things up a notch Lodash v4 has added support for emojis! Includes things like
astral symbols, unicode modifiers, variation selector characters, zero-width joiners, & regional indicator symbols.

Breaking changes

We’ve introduced more breaking changes in this release than any other so be sure to check out the changelog for a full rundown of changes & give lodash-migrate a spin to help migrate older Lodash code to the latest release.

If you dig Lodash don’t forget to star the repo or npm star lodash!


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Copy link

vercel bot commented May 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-example-dsl ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 11:21pm
medusa-example-home ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 11:21pm
medusa-example-nav ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 11:21pm
medusa-example-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 11:21pm
medusa-example-utils ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 11:21pm

Copy link

Workflow status is success ✅
Unfortunately test report wasn't generated, it can be if no workspaces changed. Please check the workflow run below.
Link to GitHub workflow: Github Workflow Link

@ScriptedAlchemy
Copy link
Member Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 4.x releases. But if you manually upgrade to 4.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@ScriptedAlchemy ScriptedAlchemy deleted the renovate/npm-lodash-vulnerability branch May 12, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant