---
title: "GHSA-qx4v-6gc5-f2vv: Regular Expression Denial of Service"
description: "Moderate severity. Regular Expression Denial of Service. Affects esm; fixed in 3.1.0."
url: https://inlinr.com/advisories/GHSA-qx4v-6gc5-f2vv
lang: en
---

[Packages](https://inlinr.com/packages) / [esm](https://inlinr.com/packages/esm) / [Security](https://inlinr.com/packages/esm/security)

Moderate Vulnerability GHSA-qx4v-6gc5-f2vv Published 20 Jun 2019

# Regular Expression Denial of Service

Your version 

Affected releases · [esm](https://inlinr.com/packages/esm)

- 3.x 3.0.0 – 3.0.84 Fixed in 3.1.0
- 2.x and older 1.0.0 – 2.2.0 No fix, no longer updated

On 3.x, the newest line:

```
npm install esm@3.1.0
```

Every release on a timeline

3.x 

1. Affected

3.0.0 – 3.0.84  
85 releases
2. Fixed

3.1.0 – 3.2.25  
31 releases, latest

2.x 

1. Affected

2.0.0 – 2.2.0  
14 releases

1.x 

1. Affected

1.0.0 – 1.0.9  
10 releases

140 stable releases of esm, oldest to newest, one row per major.

## What happens

A Regular Expression Denial of Service vulnerability was discovered in esm before 3.1.0\. The issue is that esm's find-indexes is using the unescaped identifiers in a regex, which, in this case, causes an infinite loop.

## References

- [Issue](https://github.com/standard-things/esm/issues/694 "https://github.com/standard-things/esm/issues/694")  
#694
- [Fix commit](https://github.com/standard-things/esm/commit/c41e001d81a5a52b0d2d1722b1c2af04d997c05b "https://github.com/standard-things/esm/commit/c41e001d81a5a52b0d2d1722b1c2af04d997c05b")  
c41e001

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
