Auth & Client-Side Security
medium Severity
Free Check
Session Token Shannon Entropy Analysis
Measures the randomness and bit-length of session identifiers to verify protection against session prediction attacks.
Why It Matters
Low-entropy or sequential session cookies allow attackers to calculate valid session IDs and hijack user accounts without passwords.
How We Check This
We calculate Shannon entropy on issued session cookies to confirm they contain at least 128 bits of cryptographically secure pseudorandomness.
How to Fix & Implement
Copy-paste configuration blocks tailored for your web server or edge proxy.
nginx snippet
# Use crypto.randomBytes(32).toString('hex') for session tokensFrequently Asked Questions
How long should a session token be?
At least 128 bits (16 random bytes), typically encoded as a 32-character hexadecimal string or 24-character base64 string.