CVE-2017-16111: Regular Expression Denial of Service in content
Summary
CVE-2017-16111: Regular Expression Denial of Service in content. Affects content versions < 3.0.7. Fixed in 3.0.7. 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
Background
The content package is an npm package that is used for parsing and manipulating content-type headers. It provides functionality to extract information from headers and perform various operations on them. The package is widely used in web applications and APIs to handle content-related tasks. However, versions of the content package prior to 3.0.6 are vulnerable to a regular expression denial of service (ReDoS) when parsing malicious Content-Type and Content-Disposition headers.
Vulnerability Detail
The vulnerability in the content package allows an attacker to craft specially crafted headers that can cause the parsing process to enter into an infinite loop, leading to a denial of service. This can be exploited by sending a malicious request with a carefully crafted header, causing the server to consume excessive CPU resources and potentially crash. The vulnerability is rated as HIGH severity and has been assigned the CVE identifier CVE-2017-16111. It is classified under CWE-400 (Uncontrolled Resource Consumption).
How To Fix
Minimum fixed version
3.0.7
This is the first release that contains the fix.
npm install content@3.0.7
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. The recommended approach is to update the content package to the latest version.
Conclusion
The content package prior to version 3.0.6 is vulnerable to a regular expression denial of service (ReDoS) when parsing malicious headers. This can lead to a denial of service and potential server crashes. To mitigate the vulnerability, it is crucial to update the content package to version 3.0.6 or later. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for content →
FAQ
The vulnerability can lead to a denial of service, causing the server to consume excessive CPU resources and potentially crash. This can result in service disruption and potential downtime for the affected application.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. The playground allows you to analyze your package-lock.json file and provides real-time alerts for open-source vulnerabilities.
There are no known public exploits available for this vulnerability at the time of writing. However, it is important to patch the vulnerability to prevent any potential attacks.
The only effective mitigation for this vulnerability is to update the content package to the latest version. Applying the patch provided in version 3.0.6 or later ensures that the vulnerability is addressed and the application is secure.
It is strongly recommended to update the content package to the latest version as it includes the necessary fixes for the vulnerability. Manual fixes may not provide the same level of security and could introduce other issues.