CVE-2017-16021: Regular Expression Denial Of Service in uri-js

uri-js Updated 02 Oct 2025

Summary

24/07/2018
Yes i
Moderate
6.5

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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

Latest published version: 4.4.1 as of 23 Oct 2026

npm install uri-js@4.4.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

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 →

Share this vulnerability

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.

How To Fix

Latest published version: 4.4.1 as of 23 Oct 2026

npm install uri-js@4.4.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback