Описание
Denial of Service in uap-core when processing crafted User-Agent strings
Impact
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.
Patches
Please update uap-core to >= v0.7.3
Downstream packages such as uap-python, uap-ruby etc which depend upon uap-core follow different version schemes.
Details
Each vulnerable regular expression reported here contains 3 overlapping capture groups. Backtracking has approximately cubic time complexity with respect to the length of the user-agent string.
Regex 1:
is vulnerable in portion *([^;]+) * and can be attacked with
e.g.
Regex 2:
is vulnerable in portion \d+[^\);]+[^\);]* and can be attacked with
Regex 3:
is vulnerable in portion *([^;]*) * and can be attacked with
Regex 4:
is vulnerable in portions *(?:CUS:([^;]*)|([^;]+)) * and *([^;]*) * and can be attacked with
Reported by Ben Caller @bcaller
Ссылки
- https://github.com/ua-parser/uap-core/security/advisories/GHSA-cmcx-xhr8-3w9p
- https://github.com/ua-parser/uap-ruby/security/advisories/GHSA-pcqq-5962-hvcw
- https://nvd.nist.gov/vuln/detail/CVE-2020-5243
- https://github.com/ua-parser/uap-core/commit/0afd61ed85396a3b5316f18bfd1edfaadf8e88e1
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/user_agent_parser/CVE-2020-5243.yml
Пакеты
uap-core
< 0.7.3
0.7.3
user_agent_parser
< 2.6.0
2.6.0
Связанные уязвимости
uap-core before 0.7.3 is vulnerable to a denial of service attack when processing crafted User-Agent strings. 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 has been patched in uap-core 0.7.3.
uap-core before 0.7.3 is vulnerable to a denial of service attack when processing crafted User-Agent strings. 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 has been patched in uap-core 0.7.3.
uap-core before 0.7.3 is vulnerable to a denial of service attack when ...