Vulnerabilities in pkg:npm/ms
PACKAGECVE-2017-20162 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Ms libraries in the npm ecosystem. The issue involves vercel ms inefficient regular expression complexity vulnerability. Remediation is available by upgrading affected packages to version 2.0.0.
pkg:npm/ms
Vulnerability advisories affecting package pkg:npm/ms. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w9mr-4mfr-499f | CVE-2017-20162 | MODERATE | Vercel ms Inefficient Regular Expression Complexity vulnerability |
| GHSA-3fx5-fwvr-xrjg | CVE-2015-8315 | HIGH | Regular Expression Denial of Service in ms |
CVE-2017-20162 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2017-20162
To remediate this vulnerability, upgrade all affected Ms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install ms@2.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ms
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-20162, inspect your project dependencies using npm:
npm ls ms
Analyze the terminal output to locate any version of Ms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.
Note: The npm ls ms command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Ms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-20162 Affected Ms Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ms
|
npm |
< 2.0.0
|
2.0.0
|
References
Frequently Asked Questions
What is CVE-2017-20162?
Which Ms versions are affected?
What version fixes CVE-2017-20162?
Is ms affected?
What is the CVSS score of CVE-2017-20162?
What CWE is associated with CVE-2017-20162?
How can I check npm dependencies for CVE-2017-20162?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w9mr-4mfr-499f",
"modified" : "2025-11-04T16:42:14Z",
"published" : "2023-01-05T12:30:27Z",
"aliases" : [ "CVE-2017-20162" ],
"summary" : "Vercel ms Inefficient Regular Expression Complexity vulnerability",
"details" : "A vulnerability, which was classified as problematic, has been found in vercel ms up to 1.x. This issue affects the function parse of the file index.js. The manipulation of the argument str leads to inefficient regular expression complexity. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 2.0.0 is able to address this issue. The name of the patch is caae2988ba2a37765d055c4eee63d383320ee662. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-217451.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-20162"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/ms/pull/89"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/ms/commit/caae2988ba2a37765d055c4eee63d383320ee662"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vercel/ms"
}, {
"type" : "WEB",
"url" : "https://github.com/vercel/ms/releases/tag/2.0.0"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20241108-0002"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.217451"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.217451"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-10T21:45:33Z",
"nvd_published_at" : "2023-01-05T12:15:00Z"
}
}