Explore

Rule Explorer

Search the public rule index by CVE, GHSA, CWE, language, framework, author, or rule slug. Filter by language, framework, severity, confidence, license, and validation status.

Public rules
2917
Downloads
3.3M
Verified
2917
Authors
2
Search the rule indexUse CVE, GHSA, CWE, language, framework, package, or rule slug.
15 rules matched. Showing 15 loaded rules.
Publish rule
CVE-2026-46493: Insecure Secret Generation Uniqid Randcve-2026-46493-insecure-secret-generation-uniqid-rand

The application uses `uniqid()` or `rand()` to generate sensitive cryptographic parameters (such as salts, private keys, or passwords). `uniqid()` is based on the current timestamp in microseconds and `rand()` is not a cryptographically secure pseudo-random number generator (CSPRNG). This lack of entropy allows an attacker to predict or brute-force the gener

by Provallyupdated 2026-06-12Apache-2.0
1K0 direct1K via packs
downloads
65quality
CVE-2026-8700: Perl Rand For Cryptographic Bytescve-2026-8700-perl-rand-for-cryptographic-bytes

Generating bytes with Perl's built-in rand() (e.g. `chr rand 256`) is insecure for any cryptographic purpose. Perl's rand() is a non-CSPRNG with a small, predictable internal state; bytes derived from it can be reproduced or brute-forced by an attacker. Use an OS CSPRNG such as Crypt::SysRandom::random_bytes(), Crypt::URandom, or Crypt::PRNG instead.

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
70quality
CVE-2025-69286: Insecure Urlsafetimedserializer Token Generationcve-2025-69286-insecure-urlsafetimedserializer-token-generation

Authentication/API token is generated using itsdangerous.URLSafeTimedSerializer keyed by a non-secret value (e.g. tenant_id) and/or signing a predictable payload such as a UUID, with the output being sliced. This treats the serializer as a randomness source instead of a verifiable signed token. URLSafeTimedSerializer produces deterministic base64(payload).ti

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
76quality
CVE-2025-69217: Insecure Prng For Keys Or Noncescve-2025-69217-insecure-prng-for-keys-or-nonces

A cryptographically weak pseudo-random number generator (PRNG) was detected. Functions like `random()`, `rand()`, or weak wrappers (e.g., `turn_random()`) lack sufficient entropy for generating security-sensitive values like authentication nonces, keys, or for port randomization. This allows attackers to reconstruct the internal state and predict future valu

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
73quality
CVE-2025-68932: Php Weak Prng Token Hashcve-2025-68932-php-weak-prng-token-hash

Security-sensitive token is derived from a non-cryptographic PRNG (mt_rand() and/or uniqid()) and then hashed (sha1/md5/hash). Mersenne Twister state is recoverable from a small number of outputs, and uniqid() encodes a microsecond timestamp (~20 bits of entropy). Hashing does not add entropy. Use random_bytes() (or random_int()) as the entropy source for au

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
83quality
CVE-2025-66565: Go Crypto Rand Silent Failure Fallbackcve-2025-66565-go-crypto-rand-silent-failure-fallback

The error from crypto/rand.Read (or uuid.NewRandom, which wraps crypto/rand) is silently swallowed: the failure path either returns without surfacing the error, returns the all-zero UUID constant, or falls back to another UUID/token generator. When the OS entropy source fails, the resulting identifiers become predictable (e.g. always the zero UUID), which br

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
83quality
CVE-2025-40926: Perl Insecure Session Id From Rand Hashcve-2025-40926-perl-insecure-session-id-from-rand-hash

Session/token identifier is derived by hashing the output of Perl's built-in rand(), which is a non-cryptographic PRNG seeded with only ~32 bits and is therefore predictable. Combining it with $$ (PID), time, or stringified references (memory addresses) does not add meaningful entropy, and wrapping the result in a digest (sha1_hex/md5_hex/sha256_hex/...) doe

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
75quality
CVE-2025-40924: Perl Weak Entropy Seed Generationcve-2025-40924-perl-weak-entropy-seed-generation

Generating session seeds or cryptographic tokens using weak sources of entropy like `time` and `rand` leads to highly predictable values. An attacker can brute-force or correlate these inputs to guess the final output, leading to session hijacking. Use a true CSPRNG (e.g., Crypt::SysRandom or Math::Random::Secure) instead.

by Provallyupdated 2026-06-12Apache-2.0
1.1K0 direct1.1K via packs
downloads
63quality
CVE-2025-22150: Insecure Multipart Boundary Math Randomcve-2025-22150-insecure-multipart-boundary-math-random

Generation of multipart boundaries using the cryptographically insecure `Math.random()` was detected. Boundary values can be predicted and used to inject malicious parts into the multipart request if they are sent to an attacker-controlled server alongside legitimate endpoints.

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
69quality
CVE-2025-15604: Perl Insecure Random Rand Into Hashcve-2025-15604-perl-insecure-random-rand-into-hash

Perl's built-in rand() is being fed into a cryptographic hash (SHA-1/SHA-256/SHA-512/MD5) to derive bytes. rand() is seeded with at most 32 bits and is not a CSPRNG, so hashing it (optionally with $$, Time::HiRes::time, or other low-entropy values) does not produce cryptographically strong output. This pattern produces predictable session IDs, CSRF tokens, a

by Provallyupdated 2026-06-12Apache-2.0
1.2K0 direct1.2K via packs
downloads
75quality
CVE-2024-45751: Insecure Rand Memory Populationcve-2024-45751-insecure-rand-memory-population

Use of the insecure `rand()` function to populate an array or pointer. `rand()` is deterministic and not cryptographically secure. For authentication challenges, session IDs, or cryptographic keys, this can lead to prediction or replay attacks. Use a CSPRNG like `getrandom()`.

by Provallyupdated 2026-06-12Apache-2.0
1K0 direct1K via packs
downloads
65quality
Crypto Weakrandsourcegitlab-sast-go-crypto-rule-weakrandsource

Go's `math/rand` is not meant for use in generating random numbers for any cryptographic or security sensitive context. This includes generating random numbers that could be used in user specific identifiers or where the random number that is generated is considered to be secret. Replace all imports of `math/rand` with `crypto/rand`.

by GitLab Security Productsupdated 2026-06-03Apache-2.0
1.2K0 direct1.2K via packs
downloads
92quality
Random Pseudo Random Bytesgitlab-sast-javascript-random-rule-pseudo-random-bytes

Depending on the context, generating weak random numbers may expose cryptographic functions, which rely on these numbers, to be exploitable. When generating numbers for sensitive values such as tokens, nonces, and cryptographic keys, it is recommended that the `randomBytes` method of the `crypto` module be used instead of `pseudoRandomBytes`. Example using `

by GitLab Security Productsupdated 2026-06-03MIT
1.2K0 direct1.2K via packs
downloads
92quality
Random Randomgitlab-sast-python-random-rule-random

Depending on the context, generating weak random numbers may expose cryptographic functions, which rely on these numbers, to be exploitable. When generating numbers for sensitive values such as tokens, nonces, and cryptographic keys, it is recommended that the `secrets` module be used instead. Example using the secrets module: ``` import secrets # Generate a

PythonCWE-338
by GitLab Security Productsupdated 2026-06-03MIT
1.2K0 direct1.2K via packs
downloads
86quality
Crypto WeakRNGgitlab-sast-csharp-crypto-rule-weakrng

Depending on the context, generating weak random numbers may expose cryptographic functions which rely on these numbers to be exploitable. When generating numbers for sensitive values such as tokens, nonces, and cryptographic keys, it is recommended that the `RandomNumberGenerator` class be used. Example `RandomNumberGenerator` usage: ``` Int32 randInt = Ran

by GitLab Security Productsupdated 2026-06-03MIT
1.2K0 direct1.2K via packs
downloads
86quality
All matching rules loaded.