Skip to content
XSS Write-up Intermediate

Bounty Of An Insecure Webview Part 1 Xss But With Steroids

An exported WebView activity in an Android app accepted an unvalidated URL from an intent, allowing any app to load arbitrary web content. Because JavaScript was enabled, an attacker could execute JavaScript in the WebView, including on any domain via a second intent, achieving universal XSS.

Crisdeo Nuel Siahaan Follow

Published on infosecwriteups.com

We all love our mobile apps, right? They make life easier, more fun, and keep us connected.

Crisdeo Nuel Siahaan, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The exported WebView activity did not validate the URL passed via intent extras and enabled JavaScript, allowing arbitrary URL loading and script execution.

What the attacker needed

Victim installs malicious app; target app installed

How it was found

  1. Decompile the APK and inspect AndroidManifest.xml to find the exported WebViewActivity.
  2. Use adb to start the activity with a test URL in the 'key.url' extra and confirm it loads.
  3. Build a proof-of-concept app that sends an intent with a 'javascript:' URL to the activity.
  4. Observe JavaScript execution in the WebView.
  5. Send a second intent after a delay to load a 'javascript:' URL on an already loaded page, achieving universal XSS.

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 write-up has not been written yet. The Original tab links to the source.

A WebView is a mini-browser inside a mobile app. The app left a screen that shows web pages open to other apps and did not check which web address it was given. So another app could make it open a malicious page or run harmful code.

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 Crisdeo Nuel Siahaan

View all

2 more disclosed reports, best first.

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.