SameSite? SameMess: How I Bypassed Cookie Protections to Hijack S
The session cookie was set with SameSite=Lax, allowing it to be sent on top-level GET navigations. An attacker could craft a link that, when clicked, made the victim join the attacker's team and potentially perform privileged actions.
Free Link 🎈
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The session cookie was set with SameSite=Lax instead of Strict, and no CSRF tokens were used for state-changing requests.
Impact
The attacker could add the victim to their team and potentially perform privileged actions such as inviting others or changing settings, though the text does not confirm full session hijacking.
What the attacker needed
Victim clicks a link; attacker can send link to victim
The fix
The application should use SameSite=Strict for session cookies and implement CSRF tokens for state-changing requests.
How it was found
- Create a malicious page containing an image tag that points to the invite endpoint.
- Send the link to a victim via social engineering.
- When the victim clicks, the browser sends the session cookie with the request.
- The victim is automatically joined to the attacker's team.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Cookies often have a SameSite setting that controls when they are sent. Lax means the cookie is sent when you click a link to another site. The attacker made a link that, when clicked, used the victim's logged-in session to join a team without their knowledge.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.