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-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%