CVE-2018-7651: Regular Expression Denial of Service in ssri

ssri Updated 02 Oct 2025

Summary

07/03/2018
Yes i
Moderate
5.9

CVE-2018-7651: Regular Expression Denial of Service in ssri. Affects ssri versions < 5.2.2. Fixed in 5.2.2. How to fix ↓

Also tracked for

The same CVE-2018-7651 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

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 package under scrutiny is ssri, an npm package. It is used for computing subresource integrity hashes. Subresource integrity (SRI) is a security feature that allows browsers to verify that files they fetch (such as scripts and stylesheets) have not been tampered with. The ssri package provides functions for generating and verifying SRI hashes. However, versions prior to 5.2.2 are vulnerable to regular expression denial of service (ReDoS) when using strict mode.

Vulnerability Detail

The vulnerability in ssri arises from the use of regular expressions in strict mode. An attacker can exploit this vulnerability by providing a specially crafted input that triggers a ReDoS attack. This can lead to a denial of service condition, where the application becomes unresponsive or crashes. The severity of this vulnerability is rated as MODERATE with a CVSS score of 5.9.

How To Fix

Latest published version: 14.0.0 as of 22 Oct 2026

npm install ssri@14.0.0

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

If you need the minimum change

5.2.2

This is the first release that contains the fix.

npm install ssri@5.2.2

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

Conclusion

In conclusion, the ssri package prior to version 5.2.2 is vulnerable to regular expression denial of service (ReDoS) when using strict mode. This can lead to a denial of service condition. It is recommended to update to the latest version of the package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ssri →

Share this vulnerability

FAQ

ssri is an npm package used for computing subresource integrity hashes.

Subresource integrity (SRI) is a security feature that allows browsers to verify the integrity of files they fetch.

Regular expression denial of service (ReDoS) is a type of attack that exploits the exponential time complexity of certain regular expressions, causing the application to become unresponsive or crash.

This vulnerability can lead to a denial of service condition, where the application becomes unresponsive or crashes.

To fix this vulnerability, update to version 5.2.2 or later of the ssri package.

Related vulnerabilities

Recent vulnerabilities recorded for ssri.

How To Fix

Latest published version: 14.0.0 as of 22 Oct 2026

npm install ssri@14.0.0

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

If you need the minimum change

5.2.2

This is the first release that contains the fix.

npm install ssri@5.2.2

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

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.