CVE-2017-16118 Regular Expression Denial of Service in forwarded

High 7.5 Published Updated

Attackers can cause a denial of service in Express.js applications by sending specially crafted X-Forwarded-For headers to the forwarded module.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-16118?

CVE-2017-16118 is a high-severity denial of service vulnerability in HackerOne forwarded node module, published on 7 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The forwarded module is used by the Express.js framework to handle the X-Forwarded-For header. It is vulnerable to a regular expression denial of service when it's passed specially crafted input to parse. This causes the event loop to be blocked causing a denial of service condition.

Weakness: CWE-400

Which versions are affected by CVE-2017-16118?

2 open source packages ship an affected version, including forwarded. It affects 1 product.

PackageAffectedFixed in
forwarded npmAll versions0.1.2
forwarded npmAll versions0.1.2

Products include Forwarded Project Forwarded.

How do I fix CVE-2017-16118?

Upgrade forwarded to 0.1.2 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2017-16118 being exploited?

There is no known exploitation of CVE-2017-16118 in the wild and no public exploit code.

Sources

Also known as AZL-44496, CLSA-2026-1773706635, GHSA-mpcf-4gmh-23w8.

Is CVE-2017-16118 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free