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-40933HIGHApache::AuthAny::Cookie v0.201 or earlier for Perl generates session ids insecurelyEPSS 0.4%CVE-2024-57854CRITICALNet::NSCA::Client versions through 0.009002 for Perl uses a poor random number generatorEPSS 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-2025-1828HIGHPerl's Crypt::Random module after 1.05 and before 1.56 may use rand() function for cryptographic functionsEPSS 0.4%CVE-2026-44040MEDIUMUltraVNC vncauth.c uses time-seeded libc rand() to generate VNC authentication challenge bytesEPSS 0.4%CVE-2026-47372CRITICALCrypt::SaltedHash versions through 0.09 for Perl generate insecure random values for saltsEPSS 0.4%CVE-2026-8169HIGHExtremeXOS Debug-Mode Privilege Escalation via Weak PRNGEPSS 0.4%CVE-2024-56830MEDIUMThe Net::EasyTCP package 0.15 through 0.26 for Perl uses Perl's builtin rand() if no strong randomization module is present.EPSS 0.4%CVE-2026-25726HIGHCloudreve is vulnerable to Account Takeover via Weak Cryptographic Token Generation (Insecure PRNG Seeding)EPSS 0.4%CVE-2025-54883CRITICALVision UI's security-kit Contains Cryptographic WeaknessEPSS 0.4%CVE-2024-5264MEDIUMNetwork Key Transfer with AES KHT vulnerability in Luna EFTEPSS 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-2022-48506LOWA flawed pseudorandom number generator in Dominion Voting Systems ImageCast Precinct (ICP and ICP2) and ImageCast Evolution (ICE) scanners aEPSS 0.4%CVE-2022-26943HIGHWeak PRNG entropy source used for authentication challenge generation in Motorola MTM5000EPSS 0.4%CVE-2024-56370MEDIUMNet::Xero 0.044 and earlier for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%CVE-2025-40923HIGHPlack-Middleware-Session before version 0.35 for Perl generates session ids insecurelyEPSS 0.3%CVE-2026-5085CRITICALSolstice::Session versions through 1440 for Perl generates session ids insecurelyEPSS 0.3%CVE-2026-71851CRITICALcrypto-js: Insufficient Entropy in Cryptographic Secret Generation via Vulnerable CryptoJS Dependency ChainEPSS 0.3%CVE-2024-53702MEDIUMUse of cryptographically weak pseudo-random number generator (PRNG) vulnerability in the SonicWall SMA100 SSLVPN backup code generator that,EPSS 0.3%