CVE-2017-16021
Regular Expression Denial Of Service in uri-js
uri-js is a module that tries to fully implement RFC 3986. One of these features is validating whether or not a supplied URL is valid or not. To do this, uri-js uses a regular expression, This regular expression is vulnerable to redos. This causes the program to hang and the CPU to idle at 100% usage while uri-js is trying to validate if the supplied URL is valid or not. To check if you're vulnerable, look for a call to require("uri-js").parse() where a user is able to send their own input. This affects uri-js 2.1.1 and earlier.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
6.5
uri-js is a module that tries to fully implement RFC 3986. One of these features is validating whether or not a supplied URL is valid or not. To do this, uri-js uses a regular expression, This regular expression is vulnerable to redos. This causes the program to hang and the CPU to idle at 100% usage while uri-js is trying to validate if the supplied URL is valid or not. To check if you're vulnerable, look for a call to require("uri-js").parse() where a user is able to send their own input. This affects uri-js 2.1.1 and earlier.
- Record
CVE-2017-16021- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 6.8 Medium
AV:N/AC:L/Au:S/C:N/I:N/A:C - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
CVE List No score
uri-js is a module that tries to fully implement RFC 3986. One of these features is validating whether or not a supplied URL is valid or not. To do this, uri-js uses a regular expression, This regular expression is vulnerable to redos. This causes the program to hang and the CPU to idle at 100% usage while uri-js is trying to validate if the supplied URL is valid or not. To check if you're vulnerable, look for a call to require("uri-js").parse() where a user is able to send their own input. This affects uri-js 2.1.1 and earlier.
- Record
CVE-2017-16021- Weakness
- CWE-400
- Updated
- 2026-11-02
EUVDEUVD-2018-0211 No score
uri-js is a module that tries to fully implement RFC 3986. One of these features is validating whether or not a supplied URL is valid or not. To do this, uri-js uses a regular expression, This regular expression is vulnerable to redos. This causes the program to hang and the CPU to idle at 100% usage while uri-js is trying to validate if the supplied URL is valid or not. To check if you're vulnerable, look for a call to require("uri-js").parse() where a user is able to send their own input. This affects uri-js 2.1.1 and earlier.
- Record
EUVD-2018-0211- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-333w-rxj3-f55r
6.5
Regular Expression Denial Of Service in uri-js
Affected versions of uri-js is susceptible to a regular expression denial of service vulnerability when user input is sent to the .parse() method.
Recommendation
Update to v3.0.0 or later.
- Record
GHSA-333w-rxj3-f55r- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
OSVGHSA-333w-rxj3-f55r
6.5
Regular Expression Denial Of Service in uri-js
Affected versions of uri-js is susceptible to a regular expression denial of service vulnerability when user input is sent to the .parse() method.
Recommendation
Update to v3.0.0 or later.
- Record
GHSA-333w-rxj3-f55r- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333, CWE-400
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
uri-jsnpm |
before 3.0.0 | 3.0.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2017-16021 is a medium vulnerability (CVSS 6.5) in Garycourt Uri-js, published June 4, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.32%, the 71st percentile. Fixed in uri-js 3.0.0.