CVE-2017-16118: Regular Expression Denial of Service in forwarded
Summary
CVE-2017-16118: Regular Expression Denial of Service in forwarded. Affects forwarded versions < 0.1.2. Fixed in 0.1.2. 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 forwarded package is an npm package that is used for parsing the Forwarded HTTP header. This header is used to indicate the chain of proxies or gateways that a client request has passed through. The forwarded package provides a simple way to parse this header and extract the relevant information. However, versions prior to 0.1.2 are vulnerable to regular expression denial of service (ReDoS) attacks when parsing specially crafted user input.
Vulnerability Detail
The vulnerability in the forwarded package allows an attacker to cause a denial of service (DoS) by sending a specially crafted Forwarded header. This header is parsed using a regular expression, and the vulnerability lies in the way the regular expression is constructed. By providing input that triggers exponential backtracking, an attacker can cause the regular expression engine to spend an excessive amount of time processing the input, leading to a DoS condition. This can result in the application becoming unresponsive or crashing. The impact of this vulnerability is dependent on the specific application using the forwarded package.
How To Fix
Latest published version: 0.2.0 as of 22 Oct 2026
npm install forwarded@0.2.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
0.1.2
This is the first release that contains the fix.
npm install forwarded@0.1.2
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 solution is to update the forwarded package to the latest version.
Conclusion
The forwarded package is vulnerable to regular expression denial of service attacks. To mitigate this vulnerability, it is important to update the package to version 0.1.2 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for forwarded →
FAQ
The forwarded package is an npm package used for parsing the Forwarded HTTP header.
The vulnerability allows an attacker to cause a denial of service by sending a specially crafted Forwarded header.
To fix this vulnerability, update the forwarded package to version 0.1.2 or later.
No, only versions prior to 0.1.2 are affected. Updating to version 0.1.2 or later will fix the vulnerability.
No specific workaround is mentioned for this vulnerability. Updating the package is the recommended solution.