Reino: Input Validation and Representation

Problemas de validação e representação da entrada são causados por metacaracteres, codificações alternativas e representações numéricas. Confiar na entrada resulta em problemas de segurança. Os problemas incluem: “Buffer Overflows”, ataques de “Cross-Site Scripting”, “SQL Injection”, entre outros.

Denial of Service: Parse Double

Abstract
O programa chama um método que analisa duplos e pode causar o travamento do thread.
Explanation
Há uma vulnerabilidade em implementações de java.lang.Double.parseDouble() e métodos relacionados que pode provocar o travamento do thread durante a avaliação de qualquer número no intervalo [2^(-1022) - 2^(-1075) : 2^(-1022) - 2^(-1076)]. Esse defeito pode ser usado para executar um ataque de Negação de Serviço (DoS).

Exemplo 1: O código a seguir usa um método vulnerável.

Double d = Double.parseDouble(request.getParameter("d"));


Um invasor pode enviar solicitações em que o parâmetro d é um valor no intervalo, como "0.0222507385850720119e-00306", para fazer com que o programa trave ao processar a solicitação.

Essa vulnerabilidade existe para o Java versão 6, Update 23, e versões anteriores. Ela não está presente para o Java versão 6, Update 24, e posteriores.
References
[1] Rick Regan Java Hangs When Converting 2.2250738585072012e-308
[2] Oracle Security Alert for CVE-2010-4476
[3] Standards Mapping - CIS Azure Kubernetes Service Benchmark 2
[4] Standards Mapping - CIS Amazon Elastic Kubernetes Service Benchmark 5
[5] Standards Mapping - CIS Amazon Web Services Foundations Benchmark 1
[6] Standards Mapping - CIS Google Cloud Computing Platform Benchmark complete
[7] Standards Mapping - CIS Google Kubernetes Engine Benchmark availability
[8] Standards Mapping - Common Weakness Enumeration CWE ID 400
[9] Standards Mapping - Common Weakness Enumeration Top 25 2019 [20] CWE ID 400
[10] Standards Mapping - Common Weakness Enumeration Top 25 2020 [23] CWE ID 400
[11] Standards Mapping - Common Weakness Enumeration Top 25 2022 [23] CWE ID 400
[12] Standards Mapping - DISA Control Correlation Identifier Version 2 CCI-001094
[13] Standards Mapping - NIST Special Publication 800-53 Revision 4 SC-5 Denial of Service Protection (P1)
[14] Standards Mapping - NIST Special Publication 800-53 Revision 5 SC-5 Denial of Service Protection
[15] Standards Mapping - OWASP Top 10 2004 A9 Application Denial of Service
[16] Standards Mapping - OWASP Top 10 2013 A1 Injection
[17] Standards Mapping - OWASP Top 10 2017 A1 Injection
[18] Standards Mapping - OWASP Top 10 2021 A03 Injection
[19] Standards Mapping - OWASP API 2023 API8 Security Misconfiguration
[20] Standards Mapping - OWASP Application Security Verification Standard 4.0 12.1.1 File Upload Requirements (L1 L2 L3)
[21] Standards Mapping - OWASP Mobile 2014 M1 Weak Server Side Controls
[22] Standards Mapping - OWASP Mobile 2024 M4 Insufficient Input/Output Validation
[23] Standards Mapping - OWASP Mobile Application Security Verification Standard 2.0 MASVS-CODE-4
[24] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 Requirement 6.5.9
[25] Standards Mapping - Payment Card Industry Data Security Standard Version 3.0 Requirement 6.5.6
[26] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2 Requirement 6.5.6
[27] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2.1 Requirement 6.5.6
[28] Standards Mapping - Payment Card Industry Data Security Standard Version 3.1 Requirement 6.5.6
[29] Standards Mapping - Payment Card Industry Data Security Standard Version 4.0 Requirement 6.2.4
[30] Standards Mapping - Payment Card Industry Software Security Framework 1.0 Control Objective 4.2 - Critical Asset Protection
[31] Standards Mapping - Payment Card Industry Software Security Framework 1.1 Control Objective 4.2 - Critical Asset Protection, Control Objective B.3.1 - Terminal Software Attack Mitigation, Control Objective B.3.1.1 - Terminal Software Attack Mitigation
[32] Standards Mapping - Payment Card Industry Software Security Framework 1.2 Control Objective 4.2 - Critical Asset Protection, Control Objective B.3.1 - Terminal Software Attack Mitigation, Control Objective B.3.1.1 - Terminal Software Attack Mitigation, Control Objective C.3.2 - Web Software Attack Mitigation
[33] Standards Mapping - Security Technical Implementation Guide Version 3.1 APP6080 CAT II
[34] Standards Mapping - Security Technical Implementation Guide Version 3.4 APP6080 CAT II
[35] Standards Mapping - Security Technical Implementation Guide Version 3.5 APP6080 CAT II
[36] Standards Mapping - Security Technical Implementation Guide Version 3.6 APP6080 CAT II
[37] Standards Mapping - Security Technical Implementation Guide Version 3.7 APP6080 CAT II
[38] Standards Mapping - Security Technical Implementation Guide Version 3.9 APP6080 CAT II
[39] Standards Mapping - Security Technical Implementation Guide Version 3.10 APP6080 CAT II
[40] Standards Mapping - Security Technical Implementation Guide Version 4.1 APSC-DV-002400 CAT II
[41] Standards Mapping - Security Technical Implementation Guide Version 4.2 APSC-DV-002400 CAT II
[42] Standards Mapping - Security Technical Implementation Guide Version 4.3 APSC-DV-002400 CAT II
[43] Standards Mapping - Security Technical Implementation Guide Version 4.4 APSC-DV-002400 CAT II
[44] Standards Mapping - Security Technical Implementation Guide Version 4.5 APSC-DV-002400 CAT II
[45] Standards Mapping - Security Technical Implementation Guide Version 4.6 APSC-DV-002400 CAT II
[46] Standards Mapping - Security Technical Implementation Guide Version 4.7 APSC-DV-002400 CAT II
[47] Standards Mapping - Security Technical Implementation Guide Version 4.8 APSC-DV-002400 CAT II
[48] Standards Mapping - Security Technical Implementation Guide Version 4.9 APSC-DV-002400 CAT II
[49] Standards Mapping - Security Technical Implementation Guide Version 4.10 APSC-DV-002400 CAT II
[50] Standards Mapping - Security Technical Implementation Guide Version 4.11 APSC-DV-002400 CAT II
[51] Standards Mapping - Security Technical Implementation Guide Version 5.1 APSC-DV-002400 CAT II
[52] Standards Mapping - Security Technical Implementation Guide Version 5.2 APSC-DV-002400 CAT II
[53] Standards Mapping - Security Technical Implementation Guide Version 5.3 APSC-DV-002400 CAT II, APSC-DV-002530 CAT II
[54] Standards Mapping - Web Application Security Consortium Version 2.00 Denial of Service (WASC-10)
[55] Standards Mapping - Web Application Security Consortium 24 + 2 Denial of Service
desc.dataflow.java.denial_of_service_parse_double