Skip to content
Account takeover Write-up Advanced

From a “Hey, {name} ” Banner to Full Account Takeover | Chaining 4 Bugs Through a Rewards WebView

A rewards web page in a mobile app allowed unauthenticated writes to any user's profile field, which was rendered without escaping, leading to stored XSS. The WebView exposed a bridge action returning the account JWT, and an exported deeplink loaded arbitrary URLs, enabling one-tap account takeover.

bag0zathev2 Follow

Published on medium.com

It’s been a while since my last write-up, so I brought you a juicy one. This is the story of how a tiny, harmless-looking rewards/loyalty feature inside a big mobile app ended up handing me the account session token (JWT) of any user | remotely, with a single tap on a link.

Fares Walid (SirBugs), on medium.com

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

Impact

An attacker could achieve full account takeover by stealing the victim's account JWT with a single tap on a link, without any user privileges.

What the attacker needed

Victim has the app installed; victim taps a link; attacker knows victim's hard_id

The fix

The report suggests authenticating loyalty reads/writes, escaping user fields, restricting bridge actions, and setting exported=false with host allowlisting, but does not state it was fixed.

How it was found

  1. Obtain a victim's hard_id from referral links or API responses.
  2. Send an unauthenticated request to the CRM to change the victim's first_name to a malicious payload.
  3. Trigger the vulnerable banner that renders first_name without escaping, causing stored XSS.
  4. Use the XSS to call the refresh_jwt bridge action and exfiltrate the account JWT.
  5. Craft a public link using the app://webdialog deeplink with the rewards page URL and banner trigger.
  6. Victim taps the link, the app opens the WebView, XSS fires, and the JWT is sent to the attacker.

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.

The app had a rewards page that could be tricked into showing harmful code because it trusted a user ID that wasn't secret. That code could then ask the app for the user's login token, and a special link made the app open the page automatically, so one tap stole the account.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by bag0zathev2

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.