What’s Vulnerable › Vulnerabilities
CVE-2021-21317: Denial of Service in uap-core
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-02-16 · updated 2026-06-17
- Weakness: CWE-400
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.
Affected products
- ua-parser uap-core: before 0.11.0 — fixed in 0.11.0
How to fix
Upgrade to a fixed version: ua-parser uap-core 0.11.0. Check the vendor advisory for mitigations.
References
- https://github.com/ua-parser/uap-core/commit/dc9925d458214cfe87b93e35346980612f6ae96c
- https://github.com/ua-parser/uap-core/security/advisories/GHSA-p4pj-mg4r-x6v4
- https://www.npmjs.com/package/uap-core
- https://github.com/ua-parser/uap-core/commit/dc9925d458214cfe87b93e35346980612f6ae96c
- https://github.com/ua-parser/uap-core/security/advisories/GHSA-p4pj-mg4r-x6v4
- https://www.npmjs.com/package/uap-core
Get alerted when CVE-2021-21317 or the next vulnerability affects your stack