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-2814MEDIUMCrypt::CBC versions between 1.21 and 3.05 for Perl may use insecure rand() function for cryptographic functionsEPSS 0.2%CVE-2026-34871MEDIUMAn issue was discovered in Mbed TLS before 3.6.6 and 4.x before 4.1.0 and TF-PSA-Crypto before 1.1.0. There is a Predictable Seed in a PseudEPSS 0.2%CVE-2025-1860HIGHData::Entropy for Perl uses insecure rand() function for cryptographic functionsEPSS 0.2%CVE-2025-26379HIGHJohnson Controls IQ Panels2, 2+, IQHub, IQPanel 4, PowerG use of Cryptographically Weak Pseudo-Random Number GeneratorEPSS 0.2%CVE-2026-74887MEDIUMopenssl_encrypt before 1.4.0 Insecure Random Import in PQC ModuleEPSS 0.2%CVE-2026-47882HIGHSpring Boot DevTools remote secret generated with a non-cryptographic PRNGEPSS 0.2%CVE-2026-6146MEDIUMAmazon::Credentials versions through 1.2.0 for Perl uses rand to generate encryption keysEPSS 0.2%CVE-2026-40514HIGHSmarterTools SmarterMail < Build 9610 Cryptographic Weakness via Weak RNGEPSS 0.2%CVE-2024-45723HIGHgoTenna Pro ATAK Plugin Use of Cryptographically Weak Pseudo-Random Number GeneratorEPSS 0.1%CVE-2023-31305LOWGeneration of weak and predictable Initialization Vector (IV) in PMFW (Power Management Firmware) may allow an attacker with privileges to rEPSS 0.1%CVE-2025-41731HIGHJumo: Insufficient entropy in PRNG may lead to root accessEPSS 0.1%CVE-2025-27552MEDIUMDBIx::Class::EncodedColumn until 0.00032 for Perl uses insecure rand() function for salting password hashes in Crypt/Eksblowfish/Bcrypt.pmEPSS 0.1%CVE-2025-27551MEDIUMDBIx::Class::EncodedColumn until 0.00032 for Perl uses insecure rand() function for salting password hashes in Digest.pmEPSS 0.1%CVE-2026-11347HIGHHardcoded Cryptographic Keys and Weak IV Generation in linqiEPSS 0.1%