CVE-2017-20162: Vercel ms Inefficient Regular Expression Complexity Vulnerability

ms Updated 02 Oct 2025

Summary

05/01/2023
Yes i
Moderate
5.3

CVE-2017-20162: Vercel ms Inefficient Regular Expression Complexity vulnerability. Affects ms versions < 2.0.0. Fixed in 2.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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The 'ms' package is an npm package used for converting various time formats to milliseconds. It is commonly used in JavaScript applications to handle time-related operations. The vulnerability in the 'ms' package up to version 1.x allows for inefficient regular expression complexity. This vulnerability can be exploited remotely and has been publicly disclosed. Upgrading to version 2.0.0 resolves this issue. The associated patch is named caae2988ba2a37765d055c4eee63d383320ee662.

Vulnerability Detail

The vulnerability in the 'ms' package arises from inefficient regular expression complexity in the 'parse' function of the 'index.js' file. By manipulating the 'str' argument, an attacker can trigger excessive computational overhead due to the inefficient regular expression. This vulnerability can be exploited remotely, potentially leading to denial of service (DoS) attacks. The Common Vulnerability Scoring System (CVSS) score for this vulnerability is 5.3.

How To Fix

Latest published version: 2.1.3 as of 22 Oct 2026

npm install ms@2.1.3

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

If you need the minimum change

2.0.0

This is the first release that contains the fix.

npm install ms@2.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. Upgrading to the fixed version is the recommended solution.

Conclusion

The 'ms' package up to version 1.x is vulnerable to an inefficient regular expression complexity issue. This vulnerability can be exploited remotely and may result in denial of service attacks. It is recommended to upgrade to version 2.0.0 or higher to mitigate this vulnerability. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ms →

Share this vulnerability

FAQ

The 'ms' package is an npm package used for converting various time formats to milliseconds. It is commonly used in JavaScript applications to handle time-related operations.

This vulnerability allows for inefficient regular expression complexity, which can be exploited remotely. It may lead to denial of service (DoS) attacks.

To fix this vulnerability, upgrade the 'ms' package to version 2.0.0 or higher by updating the package version in the project's package.json file and running the package manager's update command.

No specific workaround is provided for this vulnerability. Upgrading to the fixed version is the recommended solution.

The CVSS score for this vulnerability is 5.3.

Related vulnerabilities

Recent vulnerabilities recorded for ms.

How To Fix

Latest published version: 2.1.3 as of 22 Oct 2026

npm install ms@2.1.3

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

If you need the minimum change

2.0.0

This is the first release that contains the fix.

npm install ms@2.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