GHSA-x5rq-j2xg-h7qm CVE-2019-1010266 SNYK-JS-LODASH-73639
Regular Expression Denial of Service (ReDoS) in lodash
- Severity
- 6.5 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 3.04%
- Chance of exploitation in the next 30 days. Higher than 87.51% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-400 Uncontrolled Resource Consumption
- Fix
- Available
- 4 packages have a fixed version
Description
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.
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| lodash-rails | >= 4.7.0, < 4.17.11 |
4.17.11 |
| lodash-rails | >= 4.7.0, < 4.17.11 |
4.17.11 |
npm
| Package | Vulnerable | Fixed in |
|---|---|---|
| lodash | >= 4.7.0, < 4.17.11 |
4.17.11 |
| lodash | >= 4.7.0, < 4.17.11 |
4.17.11 |
| lodash-amd | >= 4.7.0, < 4.17.11 |
4.17.11 |
| lodash-amd | >= 4.7.0, < 4.17.11 |
4.17.11 |
| lodash-es | >= 4.7.0, < 4.17.11 |
4.17.11 |
| lodash-es | >= 4.7.0, < 4.17.11 |
4.17.11 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
lodash-rails RubyGems → 4.17.11
- bundler
bundle update lodash-rails # Gemfile: gem "lodash-rails", ">= 4.17.11"
lodash npm → 4.17.11
- npm
npm install lodash@4.17.11- yarn
yarn add lodash@4.17.11- pnpm
pnpm add lodash@4.17.11
lodash-amd npm → 4.17.11
- npm
npm install lodash-amd@4.17.11- yarn
yarn add lodash-amd@4.17.11- pnpm
pnpm add lodash-amd@4.17.11
lodash-es npm → 4.17.11
- npm
npm install lodash-es@4.17.11- yarn
yarn add lodash-es@4.17.11- pnpm
pnpm add lodash-es@4.17.11
Severity breakdown
CVSS 3.1 6.5
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-400: Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
How to prevent it
- Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
- Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
- Implementation: Ensure that all failures in resource allocation place the system into a safe posture.
References
Advisories
Fixes and patches
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-r5fr-rjxr-66jc lodash vulnerable to Code Injection via `_.template` imports key names | Critical | Also affects lodash |
| GHSA-f23m-r3pf-42rh lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and `_.omit` | Medium | Also affects lodash |
| GHSA-xxjr-mmjv-4gpg Lodash has Prototype Pollution Vulnerability in `_.unset` and `_.omit` functions | Medium | Also affects lodash |
| GHSA-29mw-wpgm-hmr9 Regular Expression Denial of Service (ReDoS) in lodash | Medium | Also affects lodash |
| GHSA-35jh-r3h4-6jhm Command Injection in lodash | High | Also affects lodash |
| GHSA-p6mc-m468-83gw Prototype Pollution in lodash | High | Also affects lodash |
| GHSA-jf85-cpcp-j695 Prototype Pollution in lodash | Critical | Also affects lodash |
| GHSA-4xc9-xhrj-v574 Prototype Pollution in lodash | High | Also affects lodash |
Credits: G-Rath, levpachmanov, mitchell-codecov
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor