---
title: "GHSA-vx3p-948g-6vhq: Regular Expression Denial of Service (ReDoS)"
description: "High severity. Regular Expression Denial of Service (ReDoS). Affects ssri; fixed in 8.0.1."
url: https://inlinr.com/advisories/GHSA-vx3p-948g-6vhq
lang: en
---

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

High Vulnerability GHSA-vx3p-948g-6vhq CVE-2021-27290 Published 19 Mar 2021

# Regular Expression Denial of Service (ReDoS)

Your version 

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

- 8.x 8.0.0 Fixed in 8.0.1
- 7.x 7.0.0 – 7.1.0 Fixed in 7.1.1
- 6.x 6.0.0 – 6.0.1 Fixed in 6.0.2
- 5.x 5.2.2 – 5.3.0 No fix on this line yet

On 8.x, the newest line:

```
npm install ssri@8.0.1
```

Every release on a timeline

14.x 

1. Not affected

14.0.0  
1 release, latest

8.x 

1. Affected

8.0.0  
1 release
2. Fixed

8.0.1  
1 release

7.x 

1. Affected

7.0.0 – 7.1.0  
3 releases
2. Fixed

7.1.1  
1 release

6.x 

1. Affected

6.0.0 – 6.0.1  
2 releases
2. Fixed

6.0.2  
1 release

5.x 

1. Not affected

5.0.0 – 5.2.1  
3 releases
2. Affected

5.2.2 – 5.3.0  
4 releases

44 stable releases of ssri, oldest to newest, one row per major.

## What happens

npm `ssri` 5.2.2-6.0.1 and 7.0.0-8.0.0, processes SRIs using a regular expression which is vulnerable to a denial of service. Malicious SRIs could take an extremely long time to process, leading to denial of service. This issue only affects consumers using the strict option.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: none
- **Integrity**: none
- **Availability**: high

CVSS:3.1/​AV:N/​AC:L/​PR:N/​UI:N/​S:U/​C:N/​I:N/​A:H

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2021-27290 "https://nvd.nist.gov/vuln/detail/CVE-2021-27290")  
nvd.nist.gov/vuln/detail/CVE-2021-27290
- [Pull request](https://github.com/npm/ssri/pull/20#issuecomment-842677644 "https://github.com/npm/ssri/pull/20#issuecomment-842677644")  
#20
- [Fix commit](https://github.com/npm/ssri/commit/76e223317d971f19e4db8191865bdad5edee40d2 "https://github.com/npm/ssri/commit/76e223317d971f19e4db8191865bdad5edee40d2")  
76e2233
- [Fix commit](https://github.com/npm/ssri/commit/809c84d09ea87c3857fa171d42914586899d4538 "https://github.com/npm/ssri/commit/809c84d09ea87c3857fa171d42914586899d4538")  
809c84d
- [Fix commit](https://github.com/npm/ssri/commit/b30dfdb00bb94ddc49a25a85a18fb27afafdfbb1 "https://github.com/npm/ssri/commit/b30dfdb00bb94ddc49a25a85a18fb27afafdfbb1")  
b30dfdb
- [Reference](https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf "https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf")  
cert-portal.siemens.com/productcert/pdf/ssa-389…
- [Reference](https://doyensec.com/resources/Doyensec%5FAdvisory%5Fssri%5Fredos.pdf "https://doyensec.com/resources/Doyensec_Advisory_ssri_redos.pdf")  
doyensec.com/resources/Doyensec\_Advisory\_ssri\_r…
- [Package](https://github.com/npm/ssri "https://github.com/npm/ssri")  
github.com/npm/ssri
- [Reference](https://github.com/yetingli/SaveResults/blob/main/pdf/ssri-redos.pdf "https://github.com/yetingli/SaveResults/blob/main/pdf/ssri-redos.pdf")  
github.com/yetingli/SaveResults/blob/main/pdf/s…
- [Reference](https://npmjs.com "https://npmjs.com")  
npmjs.com
- [Reference](https://www.npmjs.com/package/ssri "https://www.npmjs.com/package/ssri")  
npmjs.com/package/ssri
- [Reference](https://www.oracle.com/security-alerts/cpuoct2021.html "https://www.oracle.com/security-alerts/cpuoct2021.html")  
oracle.com/security-alerts/cpuoct2021.html

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.
