Skip to content
XSS Write-up Intermediate

Stealing cookies from subdomain leads to takeover user accounts at redacted.com

An authentication cookie was shared across all subdomains, and a subdomain's code playground allowed JavaScript injection. An attacker could steal the cookie via a crafted URL and use it to access the victim's dashboard account.

Bijan Murmu Follow

Published on web.archive.org

Hi , I’m Bijan (0xBijan) , today I’m gonna share one of my finding on ATO bugs .

Bijan Murmu (@0xBijan), on web.archive.org

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 authentication cookie was scoped to the parent domain and a subdomain's code playground allowed script injection without adequate filtering.

Impact

An attacker could steal a logged-in user's authentication token and access their dashboard account, including API tokens; no CSP was implemented to block the attack.

What the attacker needed

Victim is logged into dashboard.redacted.com; victim clicks a crafted link; attacker has a server to receive data

How it was found

  1. Log in to dashboard.redacted.com and observe the auth token in the unifiedDashboardAuth cookie.
  2. Find a subdomain with a code component playground that allows JavaScript injection.
  3. Create a malicious code component that sends document.cookie to an attacker-controlled server.
  4. Copy the URL of the created component and send it to a logged-in victim.
  5. Receive the stolen cookie containing the victim's auth token.
  6. Use the token in the Authorization header to make requests and access the victim's account.

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.

When you log in, the site gives your browser a secret token (a cookie) that proves who you are. This token was valid on every subdomain, and one subdomain let users run their own code. An attacker could make a link that runs code to copy the token and send it to themselves, then use it to log in as the victim.

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 Bijan Murmu

View all

8 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.