Fallos del tipo CWE-338

154 resultados

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

A aplicação utiliza funções de geração de números aleatórios (como Math.random(), rand() ou similar) que não são adequadas para fins criptográficos, permitindo que um atacante preveja ou reproduza os valores gerados. Isso compromete a segurança de operações sensíveis como geração de tokens, chaves de sessão, nonces e valores criptográficos.

Ejemplo

Um servidor web gera tokens de autenticação usando Math.random() em JavaScript ou rand() em C. Um atacante observa alguns tokens válidos, consegue adivinhar o padrão ou seed do gerador e forja um token válido para sequestrar sessões de outros usuários.

Cómo mitigar

Utilize geradores de números aleatórios criptograficamente seguros: crypto.getRandomValues() em JavaScript/navegadores, SecureRandom em Java, secrets em Python, ou /dev/urandom em sistemas Unix. Nunca use funções de propósito geral (Math.random, rand) para operações criptográficas ou de segurança.

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%