
Once a user logs in, the session is what keeps them logged in. If session tokens are predictable, never expire or are exposed in URLs, an attacker can take over accounts without ever knowing a password.
Common weaknesses include short or predictable session IDs, not issuing a new session ID at login (session fixation), putting tokens in URLs where they end up in logs and Referer headers, and sessions that stay valid forever.
An attacker sets a known session ID for the victim before login. If the application keeps the same ID after login, the attacker shares the session.
Use an idle timeout (often 15–30 minutes for sensitive apps) and an absolute timeout, and invalidate sessions on logout.
Try Vooki Pro free for 7 days
Make sure a stolen session is worth as little as possible. The trial unlocks every feature for 7 days, and scanning runs on your own machine.
Related: Secure cookie flags: Secure, HttpOnly and SameSite · Login and password security best practices