CVE-2017-16119: Regular Expression Denial of Service in fresh
Summary
CVE-2017-16119: Regular Expression Denial of Service in fresh. Affects fresh versions < 0.5.2. Fixed in 0.5.2. How to fix ↓
Also tracked for
- node-fresh · Debian:11
The same CVE-2017-16119 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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
Background
The fresh package is an npm package used for parsing and comparing HTTP request headers. It is commonly used in web applications to determine if a resource is fresh or stale based on the request headers. The package provides functionality to parse and compare the If-None-Match and If-Modified-Since headers. However, versions of fresh prior to 0.5.2 are vulnerable to regular expression denial of service (ReDoS) attacks when parsing specially crafted user input.
Vulnerability Detail
The vulnerability in fresh arises from the way it handles user input. An attacker can exploit this vulnerability by sending specially crafted input that triggers a ReDoS attack. This can lead to a denial of service condition where the application becomes unresponsive or consumes excessive CPU resources. The vulnerability is rated as HIGH severity and has been assigned the Common Weakness Enumeration (CWE) ID CWE-400.
How To Fix
Minimum fixed version
0.5.2
This is the first release that contains the fix.
npm install fresh@0.5.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The fresh package prior to version 0.5.2 is vulnerable to regular expression denial of service attacks. To protect your application, it is recommended to update to version 0.5.2 or later. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for fresh →
FAQ
The vulnerability can lead to a denial of service condition where the application becomes unresponsive or consumes excessive CPU resources.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your package-lock.json file and the playground will analyze it for vulnerabilities in real-time.
No, only versions prior to 0.5.2 are affected. It is recommended to update to version 0.5.2 or later to fix the vulnerability.
No, the recommended solution is to update to the latest version of the fresh package.
There are no known public exploits for this vulnerability at the moment.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.