CVE-2020-28500Regular Expression Denial of Service (ReDoS) in lodash
A medium-severity vulnerability reachable over the network, needing no privileges and no user interaction. EPSS estimates a 7.4% chance of exploitation in the next 30 days. A fixed version is named.
- Exploited in the wild
- Not in KEV
- EPSS
- 7.4%
- percentile 95%
- Fix
- Named by a source
- CVE published 15 Feb 2021
Reference
None of the "Needs attention" rules apply right now.
EPSS 7.4% (+7) · Network attack vector (+10) · No privileges required (+5) · No user interaction (+5)
Immediate actions
- lodash-rails (RubyGems): upgrade to 4.17.21 or later on your release line.
- lodash (npm): upgrade to 4.17.21 or later on your release line.
- lodash-es (npm): upgrade to 4.17.21 or later on your release line.
- Fixed in another package of the same advisory: lodash 4.17.21. A migration, not an upgrade of lodash.trim (npm), lodash.trimend (npm).
- Fixed in another package of the same advisory: lodash-es 4.17.21. A migration, not an upgrade of lodash.trim (npm), lodash.trimend (npm).
- Commit / pull request: https://github.com/github/advisory-database/pull/6139
- Commit / pull request: https://github.com/lodash/lodash/pull/5065
- Commit / pull request: https://github.com/lodash/lodash/pull/5065/commits/02906b8191d3c100c193fe6f7b27d1c40f200bb7
- Commit / pull request: https://github.com/lodash/lodash/commit/c4847ebe7d14540bb28a8b932a9ce1b9ecbfee1a
Who should check
lodash-rails (RubyGems) pkg:gem/lodash-rails
- Affected>= 4.0.0, < 4.17.21Fixed in4.17.21OSV (GHSA-29mw-wpgm-hmr9)
lodash (npm) pkg:npm/lodash
- Affected>= 4.0.0, < 4.17.21Fixed in4.17.21OSV (GHSA-29mw-wpgm-hmr9)
lodash-es (npm) pkg:npm/lodash-es
- Affected>= 4.0.0, < 4.17.21Fixed in4.17.21OSV (GHSA-29mw-wpgm-hmr9)
lodash.trim (npm) pkg:npm/lodash.trim
- Affected>= 4.0.0, <= 4.5.1Last known affected4.5.1OSV (GHSA-29mw-wpgm-hmr9)
lodash.trimend (npm) pkg:npm/lodash.trimend
- Affected>= 4.0.0, <= 4.5.1Last known affected4.5.1OSV (GHSA-29mw-wpgm-hmr9)
Confirmed facts
- CVSS
- 5.3 MEDIUM (version 3.1)
- Score from
- GitHub Advisory Database (GHSA-29mw-wpgm-hmr9)
- Attack vector
- network
- Attack complexity
- low
- Privileges required
- none
- User interaction
- none
- Weakness
- CWE-1333, CWE-400
Unknowns
- We show one CVSS score. Other sources may score this CVE differently.
Advisory text
Quoted from the source advisory (untrusted)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): ```js 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); ```
Update history
No events recorded. Our history starts on 1 Jan 2025.
References
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2020-28500
- commit / pull requesthttps://github.com/github/advisory-database/pull/6139
- commit / pull requesthttps://github.com/lodash/lodash/pull/5065
- commit / pull requesthttps://github.com/lodash/lodash/pull/5065/commits/02906b8191d3c100c193fe6f7b27d1c40f200bb7
- commit / pull requesthttps://github.com/lodash/lodash/commit/c4847ebe7d14540bb28a8b932a9ce1b9ecbfee1a
- otherhttps://www.oracle.com/security-alerts/cpuoct2021.html
- otherhttps://www.oracle.com/security-alerts/cpujul2022.html
- otherhttps://www.oracle.com/security-alerts/cpujan2022.html
- otherhttps://www.oracle.com//security-alerts/cpujul2021.html
- otherhttps://snyk.io/vuln/SNYK-JS-LODASH-1018905
- otherhttps://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074893
- otherhttps://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074895
- otherhttps://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074892
- otherhttps://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074894
- otherhttps://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074896
- otherhttps://security.netapp.com/advisory/ntap-20210312-0006
- otherhttps://github.com/rubysec/ruby-advisory-db/blob/master/gems/lodash-rails/CVE-2020-28500.yml
- otherhttps://github.com/lodash/lodash/blob/npm/trimEnd.js%23L8
- otherhttps://github.com/lodash/lodash
- otherhttps://cert-portal.siemens.com/productcert/pdf/ssa-637483.pdf
Sources
- EPSS by FIRST.org, Free to use, attribution requested. Scores generated by Empirical Security.
- GHSA-29mw-wpgm-hmr9 (GitHub Advisory Database), CC BY 4.0.
- OSV.dev, Per database.
This page is our own presentation: records are shortened, normalised and merged. Licences
Last checked: kev 30 min ago · osv 30 min ago · nvd 2 h ago · epss 30 min ago · JSON · ask via MCP: explain_vulnerability
Also known as GHSA-29mw-wpgm-hmr9