Vulnerability
Attack Flow
Vulnerability
The defining feature of fixation, compared to most session attacks, is that the attacker doesn't need to intercept or steal anything from the victim. They control the session ID from the very beginning, before the victim ever logs in.
Attacker visits the target site
↓
Server issues a valid, pre-authentication session ID
↓
Attacker now holds a session ID the server will recognizeSome applications make even this step unnecessary:
Application accepts any session ID it has never seen before
(rather than only recognizing IDs it issued itself)
↓
Attacker doesn't need to visit first — they simply invent an IDNext, the attacker gets the victim to start a session using that specific ID.
Attacker crafts a link:
https://example.com/login?PHPSESSID=attacker-chosen-value
↓
Sent to victim via phishing email, forum post, or message
↓
Victim clicks the link
↓
Victim's browser is now carrying the attacker's chosen session IDWhere the application only accepts session IDs via cookie, the delivery has to go a different way:
Application accepts session IDs via cookie only
↓
Attacker needs another way to set that cookie in the victim's browser
↓
XSS elsewhere on the same site or a related subdomain
OR
A response-splitting bug injecting a Set-Cookie header
↓
Victim's browser now holds: Session ID = attacker-chosen-valueThen the victim, unaware anything is wrong, logs in normally:
Victim enters real credentials on the real site
↓
❌ Application authenticates WITHOUT generating a new session ID
↓
The attacker-planted ID is now marked as fully authenticated
↓
Attacker already knows this ID
↓
Attacker uses it directly → logged in as the victimNo password, token, or credential theft required at any point.