CVE-2017-16030 ReDoS via long UserAgent header in useragent

High 7.5 Published Updated

An attacker can cause a denial of service by sending an arbitrarily long user-agent string, blocking the server event loop.

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-16030?

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

Official description

Useragent is used to parse useragent headers. It uses several regular expressions to accomplish this. An attacker could edit their own headers, creating an arbitrarily long useragent string, causing the event loop and server to block. This affects Useragent 2.1.12 and earlier.

Weakness: CWE-400

Which versions are affected by CVE-2017-16030?

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

PackageAffectedFixed in
useragent npmAll versions2.1.13
useragent npmAll versions2.1.13

Products include Useragent Project Useragent.

How do I fix CVE-2017-16030?

Upgrade useragent to 2.1.13 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-16030 being exploited?

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

Sources

Also known as GHSA-pjmx-9xr3-82qr.

Is CVE-2017-16030 in your software?

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

Check your SBOMs for free