Vulnerability · Published Feb 16, 2021 · Assigned by GitHub_M
CVE-2021-21317Denial of Service in uap-core
Medium 5.3
In plain English
A medium-severity uncontrolled resource consumption in uap-core from ua-parser. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.5% (higher than 85% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu:22.04:LTS | uap-core | no fix listed | UBUNTU-CVE-2021-21317 |
| Ubuntu:24.04:LTS | uap-core | no fix listed | UBUNTU-CVE-2021-21317 |
| Ubuntu:25.10 | uap-core | no fix listed | UBUNTU-CVE-2021-21317 |
| Ubuntu:26.04:LTS | uap-core | no fix listed | UBUNTU-CVE-2021-21317 |
| Ubuntu:26.10 | uap-core | no fix listed | UBUNTU-CVE-2021-21317 |
| npm | uap-core | 0.11.0 | GHSA-p4pj-mg4r-x6v4 |
Affected products (as reported)
Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
- https://github.com/ua-parser/uap-core/security/advisories/GHSA-p4pj-mg4r-x6v4 x_refsource_CONFIRM
- https://github.com/ua-parser/uap-core/commit/dc9925d458214cfe87b93e35346980612f6ae96c x_refsource_MISC
- https://www.npmjs.com/package/uap-core x_refsource_MISC