Session Fixation is a web application attack that enables an attacker to exploit a user’s session identifier. By persuading the victim to authenticate using a session ID already known to the attacker, the attacker may gain unauthorized access to the account.
Unlike session hijacking, Session Fixation often occurs before authentication is completed. Understanding how this vulnerability works—and how secure session management, HTTPS, and privacy-conscious browsing help reduce its impact—is essential for protecting online accounts.
Session Fixation is a web application attack in which an attacker obtains or sets a valid session identifier and persuades a victim to authenticate with it. After login, the attacker reuses that identifier to access the victim’s account.
The attack typically depends on applications that accept session identifiers supplied through URLs, cookies, or request parameters without replacing them after authentication. Public links, manipulated websites, or social engineering may help deliver the fixed identifier to the target.
A successful Session Fixation attack can expose personal information, account settings, and transaction functions. It differs from session hijacking because the attacker establishes or influences the session identifier before the victim logs in, rather than stealing an already authenticated session.
Applications can reduce this risk by generating a new, unpredictable session identifier after login or privilege changes. Secure cookie attributes, HTTPS, short session lifetimes, and rejecting session identifiers from untrusted sources provide further protection.