Skip to content
Account takeover Write-up Intermediate

Deep Link Hijacking leads to Account Takeover

The Android app used a custom-scheme deep link to deliver a password-less login token, and any app could register the same scheme. A malicious app that registered the scheme could receive the victim's token if the victim picked it in the app chooser, letting the attacker log in as the victim.

medium.com

Published on medium.com

Deep links are widely used in mobile applications to improve the user experience by opening specific pages directly inside the app. However, when they are not implemented securely, they can become a dangerous attack surface.

Rawan Saeed, 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

Root cause

The app relied on a custom-scheme deep link for authentication tokens without verifying that only its own app could handle that scheme, instead of using verified HTTPS App Links.

Impact

If the victim chose the attacker's app in the chooser, the attacker could take over the account; the attack depends on that user choice.

What the attacker needed

Victim has the app installed; attacker app installed on victim device; victim clicks the login link; victim picks attacker app in chooser

The fix

The app should use verified HTTPS Android App Links instead of a custom scheme.

How it was found

  1. The victim requests a password-less login and receives an email with a deep link containing a token.
  2. The attacker installs a malicious app that registers the same custom scheme and host.
  3. The victim clicks the login link and Android shows an app chooser.
  4. The victim selects the attacker's app, which receives the token.
  5. The attacker's app sends the token to an attacker-controlled server.
  6. The attacker uses the token to log in as the victim.

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.

A deep link is a link that opens a specific screen inside an app instead of a website. This app sent login links using its own made-up scheme, and Android lets any installed app claim the same scheme. So a fake app could offer to open the link, and if the user chose it, the login token went to the attacker.

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.

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.