CVE-2020-28500 Overview
Lodash versions prior to 4.17.21 are vulnerable to Regular Expression Denial of Service (ReDoS) via the toNumber, trim, and trimEnd functions. This vulnerability allows attackers to cause application hangs or crashes by supplying specially crafted input strings that trigger catastrophic backtracking in the regular expression engine.
Critical Impact
Applications using vulnerable Lodash functions can be rendered unresponsive through malicious input, potentially causing service disruption across web applications, APIs, and backend services that depend on this widely-used JavaScript utility library.
Affected Products
- Lodash versions prior to 4.17.21
- Oracle Banking Corporate Lending Process Management (14.2.0, 14.3.0, 14.5.0)
- Oracle Banking Credit Facilities Process Management (14.2.0, 14.3.0, 14.5.0)
- Oracle Banking Extensibility Workbench (14.2.0, 14.3.0, 14.5.0)
- Oracle Communications Cloud Native Core Policy (1.11.0)
- Oracle Communications Session Border Controller (8.4, 9.0)
- Oracle PeopleSoft Enterprise PeopleTools (8.58, 8.59)
- Oracle Primavera Gateway and Primavera Unifier (multiple versions)
- Siemens SINEC INS (versions prior to 1.0 SP2)
Discovery Timeline
- 2021-02-15 - CVE-2020-28500 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-28500
Vulnerability Analysis
This vulnerability is a Regular Expression Denial of Service (ReDoS) condition that exists in three Lodash utility functions: toNumber, trim, and trimEnd. The root cause lies in how these functions process string input using regular expressions that exhibit exponential time complexity when processing certain malicious patterns.
When an attacker provides a carefully crafted string containing repeating patterns followed by a non-matching character, the regex engine attempts an exponential number of backtracking operations. This causes the JavaScript event loop to become blocked, effectively freezing the application until the regex evaluation either completes or times out.
The impact is particularly severe in Node.js server environments where blocking the event loop prevents the server from handling any other requests, leading to complete service unavailability. In browser contexts, this can cause the page to become unresponsive.
Root Cause
The vulnerability stems from inefficient regular expressions used within the affected Lodash functions. The trimEnd and trim functions use regex patterns that exhibit catastrophic backtracking behavior when processing input strings with specific repeating character sequences. The regex engine's backtracking mechanism attempts to match patterns in an exponential number of ways, causing CPU exhaustion.
The vulnerable code in trimEnd.js and related functions uses regex patterns that do not properly anchor or limit the matching scope, allowing malicious input to trigger worst-case algorithmic complexity.
Attack Vector
An attacker can exploit this vulnerability by providing malicious string input to any application function that passes user-controlled data through Lodash's toNumber, trim, or trimEnd functions. The attack is network-accessible since the malicious payload can be delivered through HTTP requests, API calls, form submissions, or any other input vector that eventually reaches the vulnerable functions.
The attack requires no authentication or special privileges—any input field that processes string data through vulnerable Lodash functions becomes a potential attack surface. The exploitation mechanism involves crafting input strings with repeating characters that maximize backtracking iterations in the regex engine.
Detection Methods for CVE-2020-28500
Indicators of Compromise
- Unusual CPU spikes in Node.js processes without corresponding increase in legitimate traffic
- Application timeouts or unresponsive behavior when processing specific input patterns
- Long-running event loop operations detected through Node.js performance monitoring
- Stack traces showing execution blocked in Lodash trim, trimEnd, or toNumber functions
Detection Strategies
- Implement dependency scanning using tools like npm audit, Snyk, or OWASP Dependency-Check to identify vulnerable Lodash versions
- Monitor application performance metrics for sudden CPU utilization increases that correlate with specific request patterns
- Use static analysis tools to identify code paths where user input flows into vulnerable Lodash functions
- Deploy runtime application self-protection (RASP) solutions that can detect and block ReDoS attack patterns
Monitoring Recommendations
- Set up alerting for Node.js event loop lag exceeding normal thresholds
- Monitor for repetitive requests with suspiciously long or pattern-heavy string parameters
- Track function execution times and alert on anomalous processing durations
- Implement request timeout limits to prevent long-running regex operations from consuming resources indefinitely
How to Mitigate CVE-2020-28500
Immediate Actions Required
- Upgrade Lodash to version 4.17.21 or later immediately across all affected applications
- Audit your application's dependency tree using npm ls lodash or yarn why lodash to identify all direct and transitive dependencies on vulnerable versions
- Review code for usage of toNumber, trim, and trimEnd functions where user input is processed
- Implement input validation to limit string length before passing to potentially vulnerable functions
Patch Information
The vulnerability is fixed in Lodash version 4.17.21. The fix modifies the regular expressions used in the affected functions to prevent catastrophic backtracking. For detailed patch information, see the GitHub Lodash Pull Request.
Organizations using Oracle products should refer to Oracle's Critical Patch Updates:
For Siemens SINEC INS users, consult the Siemens Security Advisory SSA-637483.
Workarounds
- Implement input length restrictions before string data reaches Lodash functions (e.g., limit input to 1000 characters)
- Add request timeouts at the application or web server level to prevent individual requests from consuming excessive resources
- Consider using alternative libraries or native JavaScript methods (String.prototype.trim()) for simple trimming operations
- Deploy Web Application Firewall (WAF) rules to detect and block requests containing potential ReDoS payload patterns
# Upgrade Lodash to patched version
npm update lodash@4.17.21
# Or force resolution in package.json for transitive dependencies
# Add to package.json:
# "resolutions": {
# "lodash": "^4.17.21"
# }
# Audit for vulnerable dependencies
npm audit
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


