Skip to content
XSS Write-up Intermediate

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.

supr4s Follow

Published on supras.io

Quick XSS write-up transformed into a 1-click account takeover despite a HttpOnly protected session cookie, on a HackerOne bug bounty program.

Supr4s, on supras.io

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

  1. The attacker sends the victim a crafted link containing an XSS payload that loads a remote script.
  2. The victim clicks the link, and the script runs in their browser.
  3. The script fetches the list of private conversations to find their paths.
  4. For each conversation, the script fetches the page and extracts the reflected session cookie from a hidden field.
  5. 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.

More by supr4s

View all

13 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.