Weaknesses of type CWE-340

61 results

Geração de números ou identificadores previsíveis

Ocorre quando o software usa um algoritmo fraco ou determinístico para gerar números aleatórios, tokens de sessão ou IDs únicos, permitindo que um atacante preveja os próximos valores. O risco é grave em autenticação, autorização e proteção de dados sensíveis, pois a previsibilidade compromete a segurança de toda a camada de controle de acesso.

Example

Um site gera tokens de sessão baseado em timestamp ou número sequencial: `token = timestamp + contador`. Um atacante observa alguns tokens válidos, identifica o padrão e cria tokens falsos para acessar contas de outros usuários sem credenciais legítimas.

How to mitigate

Use geradores criptograficamente seguros (como `secrets` em Python, `SecureRandom` em Java ou `crypto.getRandomValues()` em JavaScript) para criar tokens, UUIDs e IDs. Nunca use `Math.random()`, `rand()` ou funções baseadas em tempo ou sequência para fins de segurança.

CVE-2026-45673MEDIUMNetty: DNS Cache Poisoning due to Predictable PRNG and Default Static Source PortEPSS 0.3%CVE-2026-85297HIGHBucket Squatting in Cloud Run MCP leads to Service Account TakeoverEPSS 0.3%CVE-2026-5081CRITICALApache::Session::Generate::ModUniqueId versions from 1.54 through 1.94 for Perl session ids are insecureEPSS 0.3%CVE-2025-40919MEDIUMAuthen::DigestMD5 versions 0.01 through 0.04 for Perl generate the cnonce insecurelyEPSS 0.3%CVE-2025-40924MEDIUMCatalyst::Plugin::Session before version 0.44 for Perl generates session ids insecurelyEPSS 0.3%CVE-2026-47085MEDIUMAn issue was discovered in cyrus-imapd in Cyrus IMAP through 3.12.2. URLAUTH token forgery can occur via a missing mboxkey. If an attacker kEPSS 0.3%CVE-2024-10603MEDIUMWeaknesses in the generation of TCP/UDP source ports and some other header values in Google's gVisor allowed them to be predicted by an exteEPSS 0.3%CVE-2026-28810MEDIUMPredictable DNS Transaction IDs Enable Cache Poisoning in Built-in ResolverEPSS 0.3%CVE-2021-29480MEDIUMDefault client side session signing key is highly predictableEPSS 0.3%CVE-2026-4269MEDIUMImproper S3 ownership verification in Bedrock AgentCore Starter ToolkitEPSS 0.3%CVE-2026-46347MEDIUMGoobi viewer: Predictable Replacement Password Allows Account Takeover After Password ResetEPSS 0.3%CVE-2026-85496HIGHBotslab G980H Dashcams Generation of Predictable Numbers or IdentifiersEPSS 0.3%CVE-2025-58424MEDIUMBIG-IP TMM vulnerabilityEPSS 0.2%CVE-2026-8503MEDIUMApache::Session::Generate::SHA256 versions before 1.3.19 for Perl create insecure session idsEPSS 0.2%CVE-2025-68701HIGHJervis has Deterministic AES IV Derivation from PassphraseEPSS 0.2%CVE-2026-42932MEDIUMNaxclow IoT Platform Generation of Predictable Numbers or IdentifiersEPSS 0.2%CVE-2025-40932HIGHApache::SessionX versions through 2.01 for Perl create insecure session idEPSS 0.2%CVE-2025-3449LOWWeak Session Token used in Automation Runtime SDMEPSS 0.2%CVE-2025-0218MEDIUMpgAgent scheduled batch job scripts are created in a predictable temporary directory potentially allowing a denial of serviceEPSS 0.2%CVE-2026-79980MEDIUMPredictable and reused DHCPv4 transaction identifier allows spoofed DHCP replies to reconfigure gateway and DNSEPSS 0.2%