Bugcrowd · Token Leak · $750 · Hall of Fame
A session token, mailed to the attacker
Whoever holds the token is the user. The only question is where tokens can go.
Background
Session tokens are bearer instruments: whoever presents one is treated as the user, no password required. Every web security control around sessions — HttpOnly, Secure, SameSite — exists to answer one question: can this token ever reach someone who shouldn't have it?
Viator, Tripadvisor's experiences marketplace, handles traveller accounts with bookings, personal details and payment-adjacent data. A stolen session there is a ready-made identity.
The vulnerability
The vulnerable flow caused the session token to be included in a request to a destination the attacker could control or observe — the exfiltration pattern. The user's browser, faithfully following the application's own logic, carried the credential out. No malware, no phishing page of mine, no victim interaction beyond using the affected flow.
Token-exfiltration bugs usually hide in one of these places:
- Tokens placed in URLs, which then leak via redirects, referers, logs and third-party requests.
- Flows that forward the session to a user-influenced URL or parameter.
- PostMessage / redirect handlers that don't validate the receiving origin.
How I proved it
- Out-of-band confirmation. The gold standard for exfiltration is a collaborator server: if the token arrives at my listener, the leak is not theoretical. It arrived.
- My token only. All demonstrations used my own account and session — the proof shows the channel, nobody else's credential was ever touched.
- Session replay check. The exfiltrated token was confirmed to actually authenticate as the session it came from — closing the loop from "leak" to "account compromise".
Impact
Session hijacking at the victim's privilege level: bookings, personal data and account actions under the traveller's identity, bypassing the password and any MFA on the login — because a stolen session is already past the login.
Remediation
- Never place session tokens in URLs or in any request to a third-party or user-influenced destination.
- Validate redirect/callback destinations against a strict allowlist of origins.
- Bind sessions to client signals where feasible, and rotate tokens on privilege changes so a leaked token ages out fast.
Lessons
When auditing, follow the token like money in a ledger: every place it is written, sent or logged is a line item. Exfiltration bugs are accounting errors in that ledger.
Found something similar?
I help teams verify and fix issues like this — and I retest my own reports for free. Reach me at sr558079@gmail.com or read more writeups.