Session Fixation
Session fixation is an attack in which an attacker tricks a user into authenticating with a session identifier that the attacker already knows or has set. Once the user logs in, the attacker can use that same session ID to access the user's authenticated session. The attack exploits web applications that fail to issue a new session identifier after a user successfully authenticates.
In a session fixation attack, the attacker establishes or obtains a valid session token prior to user authentication, then manipulates the target user into authenticating under that pre-known session identifier. This exploits a limitation in session management whereby the application does not regenerate the session ID upon privilege escalation or login, allowing the attacker to reuse the fixated identifier to impersonate the authenticated user. The attack differs from session hijacking in that the attacker fixes the session ID before authentication rather than stealing an existing authenticated token after the fact. Successful exploitation typically requires the application to accept externally supplied session identifiers and to preserve the same session ID across the authentication boundary.
Why it matters
Session fixation is significant because it allows an attacker to gain authenticated access to a victim's account without ever needing to steal credentials or crack a password. By pre-positioning a known session identifier before the user logs in, the attacker effectively bypasses the authentication step entirely. This makes the attack particularly dangerous in applications that handle sensitive personal, financial, or health data, where an authenticated session grants broad access to private resources.
Who it's relevant to
Inside Session Fixation
Common questions
Answers to the questions practitioners most commonly ask about Session Fixation.