Falhas do tipo CWE-338

154 resultados

Uso de gerador de números pseudoaleatórios criptograficamente fraco

A aplicação utiliza um PRNG (gerador de números pseudoaleatórios) inadequado para contextos de segurança, como Math.random() ou similar, onde deveria usar funções criptograficamente seguras. Isso permite que um atacante previsibilidade ou reproduza sequências de números que deveriam ser imprevisíveis, comprometendo tokens, chaves de sessão, nonces ou outros valores críticos.

Exemplo

Um sistema gera tokens de redefinição de senha usando Math.random() em vez de uma função criptográfica. Um atacante consegue prever ou enumerar tokens válidos dentro de um tempo útil, permitindo hijacking de contas.

Como mitigar

Substitua PRNGs genéricos por funções criptograficamente seguras: em Java use java.security.SecureRandom, em Node.js use crypto.randomBytes(), em Python use secrets ou os.urandom(). Revise todo código que gera valores de segurança e aplique essas funções.

CVE-2024-57835MEDIUMAmon2::Auth::Site::LINE versions through 0.04 for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%CVE-2025-40915HIGHMojolicious::Plugin::CSRF 1.03 for Perl uses a weak random number source for generating CSRF tokensEPSS 0.3%CVE-2026-7874CRITICALWeak Cryptographic Key Derivation Exposed All Stored CredentialsEPSS 0.3%CVE-2025-40919MEDIUMAuthen::DigestMD5 versions 0.01 through 0.04 for Perl generate the cnonce insecurelyEPSS 0.3%CVE-2026-41505HIGHRELATE: Predictable Token Generation in auth.py and exam.pyEPSS 0.3%CVE-2025-40924MEDIUMCatalyst::Plugin::Session before version 0.44 for Perl generates session ids insecurelyEPSS 0.3%CVE-2025-40905HIGHWWW::OAuth 1.000 and earlier for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%CVE-2026-74874HIGHopenssl_encrypt before 1.4.0 Weak PRNG Steganography Pixel SelectionEPSS 0.3%CVE-2026-16615MEDIUMLibrest: weak random number generation in pkce implementationEPSS 0.3%CVE-2026-64798CRITICALJoomla Extension - regularlabs.com - Insecure login URL keys in IP login extensionEPSS 0.2%CVE-2026-41858MEDIUMWeak Randomness / Insecure Cryptographic Primitive (CWE-338) in Get-RandomPassword in BOSH-Ecosystem / windows-utilities-release allows a neEPSS 0.2%CVE-2026-8503MEDIUMApache::Session::Generate::SHA256 versions before 1.3.19 for Perl create insecure session idsEPSS 0.2%CVE-2024-24554MEDIUMBludit - Insecure Token GenerationEPSS 0.2%CVE-2024-47126HIGHUse of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in goTenna ProEPSS 0.2%CVE-2024-58040CRITICALCrypt::RandomEncryption for Perl uses insecure rand() function during encryptionEPSS 0.2%CVE-2026-57082MEDIUMNet::BitTorrent versions before 2.1.0 for Perl generate the MSE Diffie-Hellman private key with a non-cryptographic PRNGEPSS 0.2%CVE-2026-9205HIGHLangflow is affected by weaknesses in secret handling and sensitive configuration accessEPSS 0.2%CVE-2026-8647MEDIUMCrypt::ScryptKDF versions through 0.010 for Perl uses insecure random number source when no CSPRNG module is availableEPSS 0.2%CVE-2024-4772MEDIUMAn HTTP digest authentication nonce value was generated using `rand()` which could lead to predictable values. This vulnerability affects FiEPSS 0.2%CVE-2025-40932HIGHApache::SessionX versions through 2.01 for Perl create insecure session idEPSS 0.2%