One-Click Account Takeover via Deep Link Token Auto-Append
An exported Android deep link handler passed an attacker-controlled URL into a WebView, and the WebView code unconditionally appended the user's authentication token to that URL as a query parameter. An attacker could send a crafted deep link so the victim's token was delivered to an attacker-controlled server, enabling account takeover.
Published on medium.com
When an Android app silently attaches authentication tokens to every URL opened through a deep link, a single click is all it takes.
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
The deep link handler passed an unvalidated URL to a WebView that unconditionally appended the session token as a query parameter, with no domain allowlist or conditional token attachment.
Impact
An attacker could obtain the victim's authentication token and reuse it to authenticate as the victim, achieving one-click account takeover; the token in a query string also risks leaking via logs and referer headers.
What the attacker needed
Victim taps a crafted deep link; app installed on victim's Android device; attacker-controlled server
The fix
The app should enforce an HTTPS domain allowlist in the deep link handler, only attach tokens to first-party domains, and send tokens via an Authorization header rather than a query parameter.
How it was found
- Set up an attacker-controlled server that records the token from the query string.
- Craft a deep link with page set to webview and objectType pointing at the attacker server.
- Deliver the link to the victim via message, auto-redirect page, or similar channel.
- Victim taps the link, the app opens the WebView and appends the token to the attacker URL.
- The attacker server receives the request and logs the victim's token.
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.
Android apps can register special links (deep links) that open a screen inside the app when tapped. This app let such a link choose any web address to display, and it also automatically added the user's login token to that address. So tapping one link sent the victim's login token to a server the attacker controls, letting the attacker act as the victim.
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.