# CVE-2017-20162: vercel ms index.js parse redos

> Remote attackers can cause denial of service in the vercel ms library via inefficient regular expression complexity in the parse function.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jan 2023
- **Updated:** 15 Oct 2026
- **Also known as:** AZL-43849, AZL-44002, AZL-45126, AZL-45201, CLSA-2026-1773360972, CLSA-2026-1776991063, CLSA-2026-1776991064, CLSA-2026-1776991065, CLSA-2026-1784596309, CLSA-2026-1793303909, GHSA-w9mr-4mfr-499f, UBUNTU-CVE-2017-20162

## What is CVE-2017-20162?

CVE-2017-20162 is a medium-severity denial of service vulnerability in vercel ms, published on 5 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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 patch is named caae2988ba2a37765d055c4eee63d383320ee662. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-217451.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2017-20162?

2 open source packages ship an affected version, including ms. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ms` | npm | All versions | 2.0.0 |
| `ms` | npm | All versions | 2.0.0 |

Products: Vercel Ms.

## How do I fix CVE-2017-20162?

Upgrade ms to 2.0.0 or later.

## Is CVE-2017-20162 being exploited?

There is no known exploitation of CVE-2017-20162 in the wild and no public exploit code.

## Other vulnerabilities in vercel ms

- [CVE-2015-8315](https://insights.sbomify.com/CVE-2015-8315/): Regular Expression Denial of Service in ms (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-20162 and fix it if it is affected.

What it is: CVE-2017-20162 is a medium-severity denial of service vulnerability in vercel ms, published on 5 Jan 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-20162 in the wild and no public exploit code.

Affected packages and fixed versions:
- ms (npm): affected all versions; fixed in 2.0.0
- ms (npm): affected all versions; fixed in 2.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-20162/ (Markdown: https://insights.sbomify.com/CVE-2017-20162/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-20162
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-20162
- OSV: https://osv.dev/vulnerability/CVE-2017-20162

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-20162/
Summaries are generated and may contain mistakes; the official description above is the record.
