Fallos del tipo CWE-340

55 resultados

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

Quando um software gera números aleatórios, tokens, IDs de sessão ou sementes criptográficas de forma previsível ou com entropia insuficiente, um atacante consegue adivinhar ou reproduzir esses valores. Isso compromete mecanismos de segurança que dependem de imprevisibilidade, como autenticação, autorização e proteção de estado.

Ejemplo

Um sistema gera tokens de sessão baseado apenas no timestamp atual (ex: `token = hash(data_hora)`). Um atacante observa alguns tokens legítimos, identifica o padrão temporal e forja um token válido para sequestrar a sessão de outro usuário.

Cómo mitigar

Use sempre um gerador de números aleatórios criptograficamente seguro (ex: `java.security.SecureRandom`, `/dev/urandom`, `secrets` em Python) e alimentado com entropia de qualidade do sistema operacional. Nunca use `Math.random()`, `rand()` simples ou timestamps como base para tokens ou IDs sensíveis.

CVE-2026-2439CRITICALConcierge::Sessions versions from 0.8.1 before 0.8.5 for Perl generate insecure session idsEPSS 0.4%CVE-2026-9692MEDIUMMojolicious::Sessions::Storable versions through 0.05 for Perl generate session ids insecurelyEPSS 0.4%CVE-2026-3255MEDIUMHTTP::Session2 versions before 1.12 for Perl may generate weak session ids using the rand() functionEPSS 0.4%CVE-2025-40933HIGHApache::AuthAny::Cookie v0.201 or earlier for Perl generates session ids insecurelyEPSS 0.4%CVE-2026-5082MEDIUMAmon2::Plugin::Web::CSRFDefender versions from 7.00 through 7.03 for Perl generate an insecure session idEPSS 0.4%CVE-2026-40496HIGHFreeScout has Predictable Attachment Token that Allows Unauthenticated Private File Download via Brute ForceEPSS 0.4%CVE-2026-5080MEDIUMDancer::Session::Abstract versions through 1.3522 for Perl generates session ids insecurelyEPSS 0.4%CVE-2025-40925CRITICALStarch versions 0.14 and earlier generate session ids insecurelyEPSS 0.4%CVE-2026-9219HIGHSetracker2 Children's Smartwatch Ecosystem Generation of Predictable Numbers or IdentifiersEPSS 0.3%CVE-2025-40923HIGHPlack-Middleware-Session before version 0.35 for Perl generates session ids insecurelyEPSS 0.3%CVE-2024-12034MEDIUMAdvanced Google reCAPTCHA <= 1.25 - Brute Force Protection IP UnblockEPSS 0.3%CVE-2026-5085CRITICALSolstice::Session versions through 1440 for Perl generates session ids insecurelyEPSS 0.3%CVE-2026-5084MEDIUMWebDyne::Session versions before 3.003_704 for Perl generate the session id insecurelyEPSS 0.3%CVE-2026-75106CRITICALOpnForm Editable Submission Secret Derivation via Empty Hashids SaltEPSS 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-62294HIGHPredictable Generation of Password Recovery TokenEPSS 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-2026-64964MEDIUMGeneration of Predictable Email Confirmation Token in ATutorEPSS 0.3%CVE-2025-14602MEDIUMWeak File Name Generation in vsDeskEPSS 0.3%CVE-2025-40919MEDIUMAuthen::DigestMD5 versions 0.01 through 0.04 for Perl generate the cnonce insecurelyEPSS 0.3%