CVE-2017-16021: Regular Expression Denial Of Service in uri-js
Summary
CVE-2017-16021: Regular Expression Denial Of Service in uri-js. Affects uri-js versions < 3.0.0. Fixed in 3.0.0. 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 uri-js package is an npm package that provides a URI parsing and manipulation library. It allows developers to parse, validate, and manipulate URIs in JavaScript applications. The package is widely used in various projects and provides essential functionality for working with URIs.
Vulnerability Detail
The uri-js package is vulnerable to a regular expression denial of service (ReDoS) vulnerability when user input is passed to the .parse() method. This vulnerability can be exploited by an attacker to cause a denial of service by sending specially crafted input that triggers excessive backtracking in the regular expression used for parsing URIs. This can lead to high CPU usage and unresponsiveness of the application, potentially impacting its availability.
How To Fix
Minimum fixed version
3.0.0
This is the first release that contains the fix.
npm install uri-js@3.0.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update the uri-js package to the fixed version to mitigate the risk.
Conclusion
The uri-js package is vulnerable to a regular expression denial of service vulnerability. To protect your application, it is crucial to update the package to version 3.0.0 or later. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for uri-js →
FAQ
This vulnerability can lead to a denial of service by causing high CPU usage and unresponsiveness of the application.
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 to the playground, and it will alert you if the uri-js package is vulnerable.
No, versions up to and including 2.1.1 are affected. Updating to version 3.0.0 or later will fix the vulnerability.
Yes, updating the uri-js package to version 3.0.0 or later will fix the vulnerability.
No, updating the uri-js package to the fixed version is the only way to mitigate the risk.