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-2021-3047MEDIUMPAN-OS: Weak Cryptography Used in Web Interface AuthenticationEPSS 0.5%CVE-2026-6659HIGHCrypt::PasswdMD5 versions through 1.42 for Perl generates insecure random values for saltsEPSS 0.4%CVE-2026-18611HIGHData-science-pipelines-operator: dspo: cryptographically weak secret generation (math/rand) for db and s3 credentialsEPSS 0.4%CVE-2025-46653LOWFormidable (aka node-formidable) 2.1.0 through 3.x before 3.5.3 relies on hexoid to prevent guessing of filenames for untrusted executable cEPSS 0.4%CVE-2025-40926CRITICALPlack::Middleware::Session::Simple versions before 0.05 for Perl generates session ids insecurelyEPSS 0.4%CVE-2026-41564HIGHCryptX versions before 0.088 for Perl do not reseed the Crypt::PK PRNG state after forkingEPSS 0.4%CVE-2026-9323CRITICALInsecure PRNG and Information Exposure in urwid Web Display BackendEPSS 0.4%CVE-2026-5083MEDIUMAdo::Sessions versions through 0.935 for Perl generates insecure session idsEPSS 0.4%CVE-2025-40920HIGHCatalyst::Authentication::Credential::HTTP versions 1.018 and earlier for Perl use insecurely generated noncesEPSS 0.4%CVE-2025-40918MEDIUMAuthen::SASL::Perl::DIGEST_MD5 versions 2.04 through 2.1800 for Perl generates the cnonce insecurelyEPSS 0.4%CVE-2024-58041CRITICALSmolder versions through 1.51 for Perl uses insecure rand() function for cryptographic functionsEPSS 0.4%CVE-2026-94107CRITICALNivoCart through 2.4.0 Predictable Administrator Password Reset TokenEPSS 0.4%CVE-2018-25107HIGHThe Crypt::Random::Source package before 0.13 for Perl has a fallback to the built-in rand() function, which is not a secure source of randoEPSS 0.4%CVE-2025-40916CRITICALMojolicious::Plugin::CaptchaPNG version 1.05 for Perl uses a weak random number source for generating the captcha textEPSS 0.4%CVE-2026-2439CRITICALConcierge::Sessions versions from 0.8.1 before 0.8.5 for Perl generate insecure session idsEPSS 0.4%CVE-2026-9692MEDIUMMojolicious::Sessions::Storable versions through 0.05 for Perl generate session ids insecurelyEPSS 0.4%CVE-2026-3255MEDIUMHTTP::Session2 versions before 1.12 for Perl may generate weak session ids using the rand() functionEPSS 0.4%CVE-2025-69217HIGHCoturn has unsafe nonce and relay port randomization due to weak random number generation.EPSS 0.4%CVE-2026-63089CRITICALWireGuard Easy Weak Token Generation Information Disclosure via OTL RouteEPSS 0.4%CVE-2022-41210MEDIUMSAP Customer Data Cloud (Gigya mobile app for Android) - version 7.4, uses insecure random number generator program which makes it easy for EPSS 0.4%