The program calls a method that parses doubles and can cause the thread to hang.
There is a vulnerability in implementations ofjava.lang.Double.parseDouble()
and related methods that can cause the thread to hang when parsing any number in the range [2^(-1022) - 2^(-1075) : 2^(-1022) - 2^(-1076)]
. This defect can be used to execute a DOS (Denial of Service) attack.
Example: Even if the program does not directly use doubles, it may still be vulnerable.
protected void processLocale(HttpServletRequest request, HttpServletResponse response)
{
Locale locale = request.getLocale();
if (locale != null)
{
session.setAttribute(Globals.LOCALE_KEY, locale);
}
}
HttpServletRequest
uses parseDouble
to validate the locale from the Accept-Language header, which makes any call to getLocale()
dangerous.[1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A9 Application Denial of Service
[2] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP6080 CAT II
[3] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 730
[4] Standards Mapping - Web Application Security Consortium 24 + 2 - (WASC 24 + 2) Denial of Service
[5] Rick Regan Java Hangs When Converting 2.2250738585072012e-308
[6] Oracle Security Alert for CVE-2010-4476
[7] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.9