Skip to content
Info disclosure Disclosed report Intermediate

Android - Possible to intercept broadcasts about uploaded files

The Android app sends unprotected broadcasts about file uploads that any installed app can intercept. A malicious app could register a high-priority receiver to capture these broadcasts and learn account and file information.

bagipro Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 6 months
  • Disclosed after 6 months

Hi. There are the moments of sending unprotected broadcasts https://github.com/nextcloud/android/blob/master/src/com/owncloud/android/files/services/FileUploader.java#L1170 https://github.com/nextcloud/android/blob/master/src/com/owncloud/android/files/services/FileUploader.java#L1116 https://github.com/nextcloud/android/blob/master/src/com/owncloud/android/files/services/FileUploader.java#L1136 https://github.com/nextcloud/android/blob/600225c7c9684295bfdb43bcf7d078113b8b2f73/src/com/owncloud/android/services/SyncFolderHandler.java#L186 https://github.com/nextcloud/android/blob/600225c7c9684295bfdb43bcf7d078113b8b2f73/src/com/owncloud/android/services/SyncFolderHandler.java#L201 etc A malware can simply create a receiver:

XML
<receiver android:exported="true" android:enabled="true" android:name=".InterceptReceiver">
	<intent-filter android:priority="999">
		<action android:name="FileUploader.UPLOAD_START"/>
		<action android:name="FileUploader.UPLOAD_FINISH"/>
		<action android:name="FileUploader.UPLOADS_ADDED"/>
	</intent-filter>
</receiver>

(and other actions) And receive the broadcasts first than your own receivers More info about priority here https://developer.android.com/guide/topics/manifest/intent-filter-element.html#priority

It will disclose info about account, file info, etc

The one thing you should do is to change all calls of Context.sendStickyBroadcast on LocalBroadcastManager.sendBroadcast and all calls of Context.registerReceiver on LocalBroadcastManager.registerReceiver https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager.html instead on using removeStickyBroadcast(intent);

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 app uses unprotected broadcast mechanisms (sendStickyBroadcast and registerReceiver) instead of local broadcasts, allowing any app to intercept them.

What the attacker needed

Malicious app installed on the same device

The fix

The app should replace all calls to Context.sendStickyBroadcast with LocalBroadcastManager.sendBroadcast and all calls to Context.registerReceiver with LocalBroadcastManager.registerReceiver.

How it was found

  1. Create a malicious Android app with a broadcast receiver.
  2. Declare the receiver with a high priority and intent filters for the upload-related actions.
  3. Install the malicious app on the same device.
  4. When the legitimate app sends a broadcast, the malicious receiver gets it first and can read the disclosed information.

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 send messages called broadcasts that other apps on the phone can listen for. If these messages are not protected, a malicious app can listen in and learn private details, like which files you are uploading and to which account.

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 Nextcloud

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.