Fallos del tipo CWE-335

21 resultados

Uso incorreto de seeds em gerador de números pseudoaleatórios (PRNG)

Ocorre quando a aplicação inicializa um PRNG com um seed previsível ou insuficientemente aleatório (ex: timestamp, PID do processo, ou valor fixo), em vez de usar uma fonte de entropia criptográfica. Isso torna a sequência de números gerados previsível, comprometendo qualquer mecanismo que dependa dessa aleatoriedade, como tokens de sessão, chaves criptográficas ou sorteios.

Ejemplo

Um aplicativo gera tokens de redefinição de senha usando srand(time(NULL)) seguido de rand(). Um atacante consegue prever o token porque sabe o horário aproximado em que foi gerado e pode testar poucos valores.

Cómo mitigar

Use sempre /dev/urandom (Linux/Unix), getrandom() ou equivalentes do SO para obter entropia real; em código criptográfico, utilize bibliotecas específicas (como OpenSSL, Java SecureRandom, Python secrets). Nunca use time(), PIDs ou valores fixos como seed em contextos de segurança.

CVE-2018-14647MEDIUMPython's elementtree C accelerator failed to initialise Expat's hash salt during initialization. This could make it easy to conduct denial oEPSS 11.3%CVE-2016-10180HIGHAn issue was discovered on the D-Link DWR-932B router. WPS PIN generation is based on srand(time(0)) seeding.EPSS 4.4%CVE-2021-41117HIGHInsecure random number generationEPSS 3.1%CVE-2020-7010Elastic Cloud on Kubernetes (ECK) versions prior to 1.1.0 generate passwords using a weak random number generator. If an attacker is able toEPSS 1.4%CVE-2016-3735Piwigo is image gallery software written in PHP. When a criteria is not met on a host, piwigo defaults to usingmt_rand in order to generate EPSS 1.4%CVE-2024-27632HIGHAn issue in GNU Savane v.3.12 and before allows a remote attacker to escalate privileges via the form_id in the form_header() function.EPSS 1.3%CVE-2024-36048CRITICALQAbstractOAuth in Qt Network Authorization in Qt before 5.15.17, 6.x before 6.2.13, 6.3.x through 6.5.x before 6.5.6, and 6.6.x through 6.7.EPSS 1.0%CVE-2022-39218HIGHRandom number seed fixed during compilationEPSS 0.8%CVE-2025-24783HIGHApache Cocoon: continuations may not be privateEPSS 0.8%CVE-2025-27580HIGHNIH BRICS (aka Biomedical Research Informatics Computing System) through 14.0.0-67 generates predictable tokens (that depend on username, tiEPSS 0.7%CVE-2022-42159MEDIUMD-Link COVR 1200,1202,1203 v1.08 was discovered to have a predictable seed in a Pseudo-Random Number Generator.EPSS 0.7%CVE-2023-4472CRITICALCryptographically weak PRNG in Opinio 7.22EPSS 0.6%CVE-2024-1579HIGHInsufficient seeding of random number generatorEPSS 0.5%CVE-2026-41564HIGHCryptX versions before 0.088 for Perl do not reseed the Crypt::PK PRNG state after forkingEPSS 0.4%CVE-2021-34600MEDIUMTelenot complex: Insecure AES Key GenerationEPSS 0.4%CVE-2026-11625HIGHBytes::Random::Secure versions through 0.29 for Perl share internal state across forked processesEPSS 0.3%CVE-2026-11702HIGHBytes::Random::Secure::Tiny versions through 1.011 for Perl share internal state across forked processesEPSS 0.3%CVE-2024-55566MEDIUMColPack 1.0.10 through 9a7293a has a predictable temporary file (located under /tmp with a name derived from an unseeded RNG). The impact caEPSS 0.2%CVE-2026-25835HIGHMbed TLS before 3.6.6 and TF-PSA-Crypto before 1.1.0 misuse seeds in a Pseudo-Random Number Generator (PRNG).EPSS 0.2%CVE-2026-3503MEDIUMFault injection attack with ML-DSA and ML-KEM on ARMEPSS 0.2%