# CVE-2014-8882: validator.js regular expression denial of service

Source: https://junglewise.ai/threats/cve-2014-8882-validator-js-regular-expression-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-08-31. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2014-8882 · Severity: low · CVSS 3.1 · Published 2020-08-31

The validator.js library is a widely-used JavaScript utility for input validation. A regular expression parsing flaw in the isURL validation method can be exploited to cause excessive CPU consumption, disrupting any application or service that depends on this library for validating user-submitted URLs.

Technologies: [validator (npm)](https://junglewise.ai/threats/technologies/npm-validator). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2014-8882 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2014-8882 being exploited in the wild.

**How severe is CVE-2014-8882?** Low severity, with a CVSS score of 3.1, published 31 August 2020.

**Which products and versions are affected?** validator (npm) SEMVER:introduced=0,fixed=3.22.1.

**Is there a fix for CVE-2014-8882?** Yes. validator (npm): upgrade to 3.22.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2014-8882 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2014-8882?** 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 3.22.1 or later

  ```sh
  npm install validator@3.22.1
  ```


## Technical details

A regular expression denial of service (ReDoS) vulnerability exists in the isURL method of validator.js versions prior to 3.22.1. The vulnerable regex pattern fails to efficiently handle specially crafted URL strings, causing catastrophic backtracking and excessive CPU consumption. An unauthenticated attacker can trigger this via any code path that calls isURL on untrusted input (typically form submissions or API requests). The vulnerability was fixed in version 3.22.1 by optimizing the regex pattern to prevent backtracking.

## Affected products

- chriso validator.js before 3.22.1

## Identifiers

- CVE-2014-8882
- GHSA-f5w6-r7rg-mcgq

## Timeline

- 2020-08-31: disclosed
- 2020: patched: Fixed in version 3.22.1

## References

- [https://github.com/chriso/validator.js/issues/152](https://github.com/chriso/validator.js/issues/152)

## Related threats

- [validator.js improper length calculation in isLength function](https://junglewise.ai/threats/cve-2025-12758-validator-js-improper-length-calculation-in-islength-function)
- [validatorjs validator.js URL validation bypass in isURL](https://junglewise.ai/threats/cve-2025-56200-validatorjs-validator-js-url-validation-bypass-in-isurl)
- [Validator.js ReDoS in trim and rtrim sanitizers](https://junglewise.ai/threats/validator-js-redos-in-trim-and-rtrim-sanitizers-3960a1b8)
- [validator.js inefficient regular expression complexity](https://junglewise.ai/threats/cve-2021-3765-validator-js-inefficient-regular-expression-complexity)
- [validator moderate severity vulnerability](https://junglewise.ai/threats/validator-moderate-severity-vulnerability-d45d43ae)
