Skip to content
XSS Write-up Advanced

Uber Self XSS to Global XSS

A self-XSS on m.uber.com could be turned into a global XSS by chaining it with an arbitrary cookie installation vulnerability on business.uber.com, which allowed setting cookies for *.uber.com in Safari. This enabled stealing the oauth2 cookie of any logged-in user.

httpsonly.blogspot.hk

Published on httpsonly.blogspot.hk

This appears to be the issue which I was digging for the most time during my bugbounty experience, it took more than two months to find a perfect solution for a problem.

The author, on httpsonly.blogspot.hk

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 self-XSS arose from unsanitised user input in the profile name, and the cookie installation flaw from unsanitised input placed directly into the Cookie header.

Impact

An attacker could steal the oauth2 cookie of any logged-in user, but the cookie installation worked only for Safari users.

What the attacker needed

Victim uses Safari; victim logs into attacker's account; attacker has a business profile

The fix

The self-XSS was silently patched, and the cookie installation issue was rewarded, implying it was fixed.

How it was found

  1. Modify the business profile name via the mobile application to include a script.
  2. Log in to m.uber.com to trigger the self-XSS.
  3. Use the confirm endpoint on business.uber.com with a crafted path to set an arbitrary cookie for *.uber.com.
  4. Combine both steps to attack an external user and steal their oauth2 cookie.

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.

Self-XSS is a cross-site scripting flaw that only affects the person who enters the malicious code themselves, so it is usually considered low risk. Here, the attacker first tricks the victim into logging into the attacker's account, which triggers the self-XSS, and then uses a separate cookie-setting bug to steal the victim's real login cookie. This shows how two low-impact bugs can combine into a serious account takeover.

What is XSS?

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

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.