CVE-2020-28500 is a medium-severity (CVSS 5.3) vulnerability in lodash. 6 public exploit references exist, so weaponization risk is real. A fix is available for lodash — see the affected versions and patch details below.
Regular Expression Denial of Service (ReDoS) in lodash
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2020-28500 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
lodashnpmlodash-esnpmlodash.trimendnpmDescription
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);
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | lodash | ≥ 4.0.0&&< 4.17.21 | 4.17.21npm install lodash@4.17.21 |
| 📦npm | lodash-es | ≥ 4.0.0&&< 4.17.21 | 4.17.21npm install lodash-es@4.17.21 |
| 📦npm | lodash.trimend | ≥ 4.0.0 | No fix |
| 📦npm | lodash.trim | ≥ 4.0.0 | No fix |
| 💎RubyGems | lodash-rails | ≥ 4.0.0&&< 4.17.21 | 4.17.21bundle update lodash-rails --conservative |
Affected Products
lodashlodashbanking corporate lending process managementoraclebanking credit facilities process managementoraclebanking extensibility workbenchoraclebanking supply chain financeoraclebanking trade finance process managementoracleResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression De…
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression De…
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression De…
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression De…
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression De…
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression De…
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for lodash, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update lodash to 4.17.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-28500 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
In OpenShift ServiceMesh (OSSM) and Red Hat OpenShift Jaeger (RHOSJ) the affected containers are behind OpenShift OAuth authentication. This restricts access to the vulnerable nodejs-lodash library to authenticated users only, therefore the impact is low. While Red Hat Virtualization's cockpit-ovirt has a dependency…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Migration Toolkit for Containers 1.7 | rhmtc/openshift-migration-ui-rhel8:v1.7.4-12 | RHSA-2022:6429 |
| Red Hat OpenShift Container Platform 4.8 | openshift4/ose-console:v4.8.0-202107010336.p0.git.188a490.assembly.stream | RHSA-2021:2438 |
| Red Hat OpenShift Jaeger 1.20 | distributed-tracing/jaeger-all-in-one-rhel8:1.20.4-18 | RHSA-2021:2543 |
| Red Hat Virtualization 4 for Red Hat Enterprise Linux 8 | cockpit-ovirt-0:0.15.1-2.el8ev | RHSA-2021:3459 |
| Red Hat Virtualization Engine 4.4 | ovirt-engine-ui-extensions-0:1.2.6-1.el8ev | RHSA-2021:2179 |
Frequently Asked Questions
Is CVE-2020-28500 in your dependencies?
Find it across npm, RubyGems, including transitive dependencies.