This vulnerability occurs when a system creates numbers or identifiers that are too easy to guess, undermining security mechanisms that rely on unpredictability.
Predictable identifiers, like session tokens, initial values for cryptographic operations, or password reset codes, act as weak links in your security chain. Attackers can analyze the pattern or sequence to forecast future values, allowing them to hijack user sessions, bypass authentication, or spoof legitimate transactions. This often stems from using weak random number generators, time-based values, or simple incremental counters in security-sensitive contexts. To prevent this, developers should use cryptographically secure pseudo-random number generators (CSPRNGs) provided by the platform's security libraries for all security-critical operations. Always ensure identifiers have sufficient entropy (randomness) and length to resist brute-force guessing attacks. Avoid creating your own algorithms for randomness and regularly audit code that generates any token used for authorization, identification, or uniqueness.
Impact: Varies by Context
php