Skip to content
Mobile Write-up Intermediate

Hijacking iOS Deep Links in a Health App Using Custom URL Schemes

The iOS health app used custom URL schemes for deep linking without Universal Links, allowing any app on the same device to register the same scheme and intercept links. An attacker could capture sensitive parameters or force-navigate users to sensitive screens.

Aditya Dixit Follow

Published on blog.dixitaditya.com

During a recent pentest of an iOS health application (let's call it MedVault), I came across something interesting. The app was using custom URL schemes for deep linking but had no Universal Links implementation in place.

Aditya Dixit, on blog.dixitaditya.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 solely on custom URL schemes for deep linking without Universal Links or validation of incoming URLs.

Impact

A malicious app on the same device could intercept deep links to capture sensitive parameters or force-navigate users to sensitive screens, though the developer's fix now redirects all incoming links to the root, preventing forced navigation but not interception.

What the attacker needed

Malicious app installed on same device; victim clicks a crafted link

The fix

The app should remove unused URL schemes and adopt Universal Links, and the developer's partial fix of redirecting all incoming links to the root does not address interception.

How it was found

  1. Attach Frida to the running app to hook URL handling functions.
  2. Observe the registered URL schemes and confirm absence of Universal Links.
  3. Create an HTML page with links using the custom schemes.
  4. Open the page in Safari and tap a link to trigger the deep link.
  5. Observe the URL flowing through the app's layers without validation.

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.

Custom URL schemes are like unclaimed nicknames that any app can adopt. If a health app uses one without a verified alternative, a malicious app can claim the same nickname and receive links meant for the health app, potentially stealing data or tricking the user.

What is Mobile?

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.

Similar reports

View all

Same bug class and techniques, clearest first.

Mobile app vulnerabilities

The lesson behind this report.

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.