Uncontrolled Resource Consumption
uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser.
uap-core in an open-source npm package which contains the core of BrowserScope's original user agent string parser.
uap-core 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.
The programming library UA-Parser uses regular expressions to identify user agent strings. The complexity of some of the regular expressions is such that an attacker can craft special patterns that keep the server busy for a long time. By sending many requests in short order, an attacker can exhaust the amount of processing power available.