Weaknesses of type CWE-338

154 results

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

A aplicação usa funções como Math.random(), rand() ou similar para gerar valores que precisam ser impredizíveis (tokens, chaves, nonces). Esses geradores não foram projetados para segurança criptográfica e são facilmente previsíveis, permitindo um atacante adivinhar ou reproduzir os valores gerados.

Example

Um servidor Java gera tokens de sessão usando Math.random() em vez de SecureRandom, ou uma API Node.js cria chaves de reset de senha com Math.random(). Um atacante consegue predizer os próximos tokens testando sequências ou analisando padrões.

How to mitigate

Use geradores criptograficamente seguros: SecureRandom em Java, secrets em Python, crypto.randomBytes() em Node.js, random_bytes() em PHP. Garanta que esses valores sejam usados exclusivamente para fins de segurança (tokens, chaves, IVs).

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-41858MEDIUMWeak Randomness / Insecure Cryptographic Primitive (CWE-338) in Get-RandomPassword in BOSH-Ecosystem / windows-utilities-release allows a neEPSS 0.2%CVE-2026-64798CRITICALJoomla Extension - regularlabs.com - Insecure login URL keys in IP login extensionEPSS 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%CVE-2025-2814MEDIUMCrypt::CBC versions between 1.21 and 3.05 for Perl may use insecure rand() function for cryptographic functionsEPSS 0.2%