http-cache-semantics vulnerable to Regular Expression Denial of Service
Summary
CVE-2022-25881: http-cache-semantics vulnerable to Regular Expression Denial of Service. Affects http-cache-semantics versions < 4.1.1. Fixed in 4.1.1. How to fix ↓
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.
No signup required · Results in about 60 seconds
http-cache semantics contains an Inefficient Regular Expression Complexity , leading to Denial of Service. This affects versions of the package http-cache-semantics before 4.1.1. The issue can be exploited via malicious request header values sent to a server, when that server reads the cache policy from the request using this library.
How To Fix
Latest published version: 4.3.0 as of 22 Oct 2026
npm install http-cache-semantics@4.3.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
4.1.1
This is the first release that contains the fix.
npm install http-cache-semantics@4.1.1
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
References
Related vulnerabilities
Recent vulnerabilities recorded for http-cache-semantics.