CVE-2021-21317 Denial of Service in uap-core
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.
Which versions are affected by CVE-2021-21317?
2 open source packages ship an affected version, including uap-core. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
uap-core npm | All versions | 0.11.0 |
uap-core npm | All versions | 0.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.
Other vulnerabilities in ua-parser uap-core
Sources
Also known as GHSA-p4pj-mg4r-x6v4, UBUNTU-CVE-2021-21317.