CVE-2021-21317 Denial of Service in uap-core

Medium 5.3 Published Updated

Remote attackers can cause server overload via malicious User-Agent headers due to inefficient regexes in the uap-core library.

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

What is CVE-2021-21317?

CVE-2021-21317 is a medium-severity denial of service vulnerability in ua-parser uap-core, published on 16 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser. In uap-core before version 0.11.0, some regexes are vulnerable to regular expression denial of service (REDoS) due to overlapping capture groups. This allows remote attackers to overload a server by setting the User-Agent header in an HTTP(S) request to maliciously crafted long strings. This is fixed in version 0.11.0. Downstream packages such as uap-python, uap-ruby etc which depend upon uap-core follow different version schemes.

Weakness: CWE-1333, CWE-400

Which versions are affected by CVE-2021-21317?

2 open source packages ship an affected version, including uap-core. It affects 1 product.

PackageAffectedFixed in
uap-core npmAll versions0.11.0
uap-core npmAll versions0.11.0

Products include Uap-Core Project Uap-Core.

How do I fix CVE-2021-21317?

Upgrade uap-core to 0.11.0 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-2021-21317 being exploited?

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

Sources

Also known as GHSA-p4pj-mg4r-x6v4, UBUNTU-CVE-2021-21317.

Is CVE-2021-21317 in your software?

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

Check your SBOMs for free