CVE-2014-8882: Regular Expression Denial of Service in validator
Summary
CVE-2014-8882: Regular Expression Denial of Service in validator. Affects validator versions < 3.22.1. Fixed in 3.22.1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The validator package is an npm package used for validating and sanitizing strings. It provides various methods for validating different types of data, including URLs, emails, and numbers. The package is widely used in JavaScript applications to ensure data integrity and security. However, versions prior to 3.22.1 are affected by a regular expression denial of service vulnerability in the isURL method.
Vulnerability Detail
The vulnerability in the validator package arises from a regular expression denial of service (ReDoS) issue in the isURL method. This method is used to validate URLs. An attacker can exploit this vulnerability by providing a specially crafted URL that triggers a ReDoS attack, causing the application to consume excessive CPU resources and potentially leading to a denial of service. The severity of this vulnerability is rated as HIGH with a CVSS score of 7.5.
How To Fix
Minimum fixed version
3.22.1
This is the first release that contains the fix.
npm install validator@3.22.1
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The validator package prior to version 3.22.1 is vulnerable to a regular expression denial of service (ReDoS) attack. To ensure the security and stability of your application, it is crucial to update the package to the latest version. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for validator →
FAQ
The vulnerability can lead to a denial of service (DoS) attack by consuming excessive CPU resources. This can result in the application becoming unresponsive or unavailable.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and the tool will provide real-time alerts for open-source vulnerabilities.
No, only versions prior to 3.22.1 are affected by this vulnerability. It is important to update to the latest version to ensure the security of your application.
No, the recommended solution is to update the validator package to version 3.22.1 or later.
There are no known public exploits for this vulnerability at the moment. However, it is always recommended to update to the latest secure version to mitigate any potential risks.
Related vulnerabilities
Recent vulnerabilities recorded for validator.