Weaknesses of type CWE-334

13 results

Espaço insuficiente de valores aleatórios

A aplicação gera números aleatórios ou tokens a partir de um conjunto muito pequeno de possibilidades, tornando trivial adivinhar ou força-bruta o valor. Um atacante consegue listar todas as combinações válidas em tempo viável, comprometendo autenticação, autorização ou criptografia que dependem dessa aleatoriedade.

Example

Um sistema de recuperação de senha gera um token usando apenas um inteiro de 16 bits (65.535 possibilidades); um atacante testa todos os valores em segundos. Ou um gerador de nonce para CSRF usa apenas a hora atual em segundos, deixando poucas opções válidas.

How to mitigate

Use geradores criptográficos robustos (como `os.urandom()` em Python ou `SecureRandom` em Java) com tamanho mínimo de 128 bits. Valide o espaço de entropia: tokens críticos devem ter pelo menos 2^64 combinações possíveis, melhor 2^128 ou mais.

CVE-2022-22517HIGHCommunication Components in multiple CODESYS products vulnerable to communication channel disruptionEPSS 1.3%CVE-2021-21955HIGHAn authentication bypass vulnerability exists in the get_aes_key_info_by_packetid() function of the home_security binary of Anker Eufy HomebEPSS 1.0%CVE-2022-33707Improper identifier creation logic in Find My Mobile prior to version 7.2.24.12 allows attacker to identify the device.EPSS 0.8%CVE-2023-39979CRITICALMXsecurity Authentication BypassEPSS 0.7%CVE-2024-6890CRITICALJournyx Unauthenticated Password Reset BruteforceEPSS 0.7%CVE-2024-52616MEDIUMAvahi: avahi wide-area dns predictable transaction idsEPSS 0.7%CVE-2022-20941MEDIUMA vulnerability in the web-based management interface of Cisco Firepower Management Center (FMC) Software could allow an unauthenticated, reEPSS 0.7%CVE-2022-24402HIGHIntentionally weakened effective strength in TETRA TEA1EPSS 0.6%CVE-2025-3895CRITICALLow token entropy in MegaBIPEPSS 0.4%CVE-2024-51720MEDIUMVulnerabilities in SecuSUITE Server Components Impact SecuSUITEEPSS 0.3%CVE-2024-54017MEDIUMA vulnerability has been identified in SIPROTEC 5 6MD84 (CP300) (All versions < V11.0), SIPROTEC 5 6MD85 (CP200) (All versions), SIPROTEC 5 EPSS 0.3%CVE-2020-7566HIGHA CWE-334: Small Space of Random Values vulnerability exists in Modicon M221 (all references, all versions) that could allow the attacker toEPSS 0.3%CVE-2023-6951MEDIUMA Use of Weak Credentials vulnerability affecting the Wi-Fi network generated by a set of DJI drones could allow a remote attacker to deriveEPSS 0.3%