1-click ATO via XSS + cookie exfiltration despite HttpOnly
A reflected XSS vulnerability allowed an attacker to run arbitrary JavaScript in a victim's browser. The session cookie, though HttpOnly, was reflected in a hidden field on private conversation pages, so the attacker's script could read and exfiltrate it, leading to account takeover.
Quick XSS write-up transformed into a 1-click account takeover despite a HttpOnly protected session cookie, on a HackerOne bug bounty program.
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
Likely the application reflected the session cookie value into a hidden field on private conversation pages, defeating the HttpOnly protection.
Impact
An attacker could steal a victim's session cookie and take over their account, despite the cookie being HttpOnly.
What the attacker needed
Victim clicks a link; no CSP on the site
The fix
The report was fixed within seven days, but the text does not describe the fix.
How it was found
- The attacker sends the victim a crafted link containing an XSS payload that loads a remote script.
- The victim clicks the link, and the script runs in their browser.
- The script fetches the list of private conversations to find their paths.
- For each conversation, the script fetches the page and extracts the reflected session cookie from a hidden field.
- The script sends the extracted cookie to the attacker's server.
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.
Cross-site scripting (XSS) lets an attacker inject JavaScript into a page that other users view. Normally a session cookie is protected by HttpOnly, meaning scripts cannot read it, but here the cookie value was also placed in a hidden field on the page, so the attacker's script could read it from there and send it to their own server, taking over the account.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.