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-2026-5084MEDIUMWebDyne::Session versions before 3.003_704 for Perl generate the session id insecurelyEPSS 0.3%CVE-2025-15618CRITICALBusiness::OnlinePayment::StoredTransaction versions through 0.01 for Perl uses an insecure secret keyEPSS 0.3%CVE-2026-11832CRITICALDancer2::Plugin::Auth::OAuth versions before 0.22 for Perl default to a predictable nonceEPSS 0.3%CVE-2026-92298MEDIUMEspoCRM through 10.0.8 Weak Token Generation via rand()EPSS 0.3%CVE-2023-34363MEDIUMAn issue was discovered in Progress DataDirect Connect for ODBC before 08.02.2770 for Oracle. When using Oracle Advanced Security (OAS) encrEPSS 0.3%CVE-2026-73567CRITICALsm-crypto: Predictable SM2 key generation in Node.js: default RNG uses Math.random + wall clockEPSS 0.3%CVE-2026-5087HIGHPAGI::Middleware::Session::Store::Cookie versions through 0.001003 for Perl generates random bytes insecurelyEPSS 0.3%CVE-2026-40975MEDIUMValues produced by ${random.value} are not suitable for use as secrets. ${random.uuid} is not affected. ${random.int} and ${random.long} shoEPSS 0.3%CVE-2026-13082MEDIUMGD::SecurityImage versions through 1.75 for Perl use rand to generate secretsEPSS 0.3%CVE-2002-20002MEDIUMThe Net::EasyTCP package before 0.15 for Perl always uses Perl's builtin rand(), which is not a strong random number generator, for cryptogrEPSS 0.3%CVE-2026-9638HIGHCrypt::PBKDF2 versions before 0.261630 for Perl generate insecure random values for saltsEPSS 0.3%CVE-2021-26091MEDIUMA use of a cryptographically weak pseudo-random number generator vulnerability in the authenticator of the Identity Based Encryption serviceEPSS 0.3%CVE-2026-42155CRITICALMagento LTS: Weak API Session ID — Predictable MD5 of Time-Derived InputsEPSS 0.3%CVE-2024-57868MEDIUMWeb::API 2.8 and earlier for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%CVE-2024-52322MEDIUMWebService::Xero 0.11 for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%CVE-2025-15578CRITICALMaypole versions from 2.10 through 2.13 for Perl generates session ids insecurelyEPSS 0.3%CVE-2026-46493HIGHhaxtheweb/haxcms-php uses insecure method for generating saltEPSS 0.3%CVE-2026-7830HIGHUltraVNC MS-Logon II uses 64-bit Diffie-Hellman and seeded libc rand() enabling credential interceptionEPSS 0.3%CVE-2024-58036MEDIUMNet::Dropbox::API 1.9 and earlier for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%CVE-2024-57835MEDIUMAmon2::Auth::Site::LINE versions through 0.04 for Perl uses insecure rand() function for cryptographic functionsEPSS 0.3%