CVE-2020-5243: Denial of Service in uap-core when processing crafted User-Agent strings
Summary
CVE-2020-5243: Denial of Service in uap-core when processing crafted User-Agent strings. Affects uap-core versions < 0.7.3. Fixed in 0.7.3. How to fix ↓
Also tracked for
- uap-core · Debian:11
The same CVE-2020-5243 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
uap-core is an npm package that provides user-agent parsing functionality. It is commonly used in web applications to extract information about the client's browser, operating system, and device. This vulnerability in uap-core allows remote attackers to perform a Denial of Service (DoS) attack by sending maliciously crafted User-Agent strings. The vulnerability arises from the presence of overlapping capture groups in certain regular expressions used by uap-core. When a long string is processed by these vulnerable regular expressions, it causes excessive backtracking, leading to a significant slowdown or crash of the server.
Vulnerability Detail
The vulnerability in uap-core arises from the presence of overlapping capture groups in certain regular expressions. 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 backtracking required to process these strings has a cubic time complexity, making it an effective vector for a Denial of Service attack. The impact of this vulnerability can range from server slowdowns to complete unavailability, depending on the server's capacity and the size of the crafted User-Agent string.
How To Fix
Minimum fixed version
0.7.3
This is the first release that contains the fix.
npm install uap-core@0.7.3
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. The recommended solution is to update uap-core to the latest version.
Conclusion
The vulnerability in uap-core allows remote attackers to perform a Denial of Service attack by sending maliciously crafted User-Agent strings. To mitigate this vulnerability, it is crucial to update uap-core and any downstream packages to the latest versions that include the necessary patches. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for uap-core →
FAQ
uap-core is an npm package that provides user-agent parsing functionality. It is commonly used in web applications to extract information about the client's browser, operating system, and device.
The vulnerability allows remote attackers to perform a Denial of Service attack by sending maliciously crafted User-Agent strings. This can lead to server slowdowns or unavailability.
To fix this vulnerability, update uap-core to version 0.7.3 or higher. Make sure to also update any downstream packages that depend on uap-core.
There are no specific workarounds mentioned for this vulnerability. Updating to the latest version is the recommended solution.
For more information about this vulnerability, you can refer to the GitHub Advisory Database entry: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/02/GHSA-cmcx-xhr8-3w9p/GHSA-cmcx-xhr8-3w9p.json
References
Related vulnerabilities
Recent vulnerabilities recorded for uap-core.