1 Common Authentication Flaws
Broken authentication covers a range of weaknesses that allow attackers to compromise user accounts without knowing the password.
Credential stuffing: Attackers use breach databases (billions of username/password pairs) against your login endpoint. Without rate limiting or breach detection, automated tools can test thousands of combinations per second.
Predictable session tokens:
# Vulnerable: sequential or time-based session IDs
session_id = str(int(time.time())) # Predictable!
session_id = str(user_id) + "12345" # Trivially guessableNo account lockout: Without lockout after failed attempts, brute force attacks succeed against weak passwords. Attackers use password spraying (one common password across many accounts) to avoid per-account lockout thresholds.
Insecure "Remember Me": Storing user ID in a cookie without a cryptographic signature allows attackers to forge authentication cookies by guessing other user IDs.