Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3, published 19 November 2021.
- Which products and versions are affected?
- validator (npm) SEMVER:introduced=11.1.0,fixed=13.7.0.
- Is there a fix for This vulnerability?
- Yes. validator (npm): upgrade to 13.7.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network.
- Am I affected?
- Check whether you run validator (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- validator (npm): upgrade to 13.7.0 or later
npm install validator@13.7.0
Technical details
This vulnerability is a Regular Expression Denial of Service (ReDoS) issue affecting the rtrim and trim sanitizer functions in Validator.js versions 11.1.0 through 13.6.0. The vulnerable regular expressions exhibit inefficient computational complexity (CWE-1333) that can be exponential in worst-case scenarios when processing adversarial input. An unauthenticated attacker can exploit this via a network request by sending specially crafted strings to any application endpoint that uses the affected sanitizers, causing the regex engine to consume excessive CPU and potentially hang or degrade performance. The issue is fixed in version 13.7.0 and later.
Affected products
- npm validator >=11.1.0, <13.7.0
Timeline
- 2021-11-19: disclosed
- 2021-11-19: patched: Fixed in validator 13.7.0