Skip to content
Access control Disclosed report Beginner

Vulnerable exported broadcast receiver

The Android app's PackageReplacedReceiver was exported, allowing any third-party app to send it broadcasts. An attacker could tamper with the receiver's behaviour, though the report does not specify the exact impact.

b3nac Follow

Originally disclosed on HackerOne

  • Fixed in 3 hours
  • Disclosed after 5 hours

Good evening,

This is actually in your code base this time. :)

Since the following broadcast receiver has export=true it can be exploited by 3rd parties.

#Vulnerability

com.x8bit.bitwarden.PackageReplacedReceiver has exported set to true making the receiver vulnerable to tampering.

Vuln_Receiver.PNG
Vuln_Receiver.PNG From the original on HackerOne

#POC

I was able to send information to the receiver and get a response with Drozer. This gives me further information to craft the right payload.

TestingtheBroadcast.PNG
TestingtheBroadcast.PNG From the original on HackerOne

#Fix In the manifest changing exported to false or if the broadcast needs to be exported the following would be the correct fix.

At the top of the manifest with the other permissions.

<permission android: name="com.x8bit.bitwarden.PackageReplacedReceiverPermission" android:protectionLevel="signature" />

Modified receiver manifest entry.

<receiver android:name="com.x8bit.bitwarden.PackageReplacedReceiver" android:exported="true" android:permission="com.x8bit.bitwarden.PackageReplacedReceiverPermission">
            <intent-filter>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>

Adding the signature custom permission makes it so the broadcast can only be used with applications that were signed with the same key.

Please let me know if you have any questions. Great job on this app by the way. It's one of the most secure apps I've seen so far on H1.

#Resources https://oldbam.github.io/android/security/android-vulnerabilities-insecurebank-broadcast-receivers

The original report as published on HackerOne, by b3nac. 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 broadcast receiver was declared with android:exported="true" without a permission restriction, making it accessible to any application.

Impact

A third-party app could send broadcasts to the receiver, potentially tampering with its behaviour, but the report does not demonstrate a concrete harmful outcome.

What the attacker needed

Attacker can install a malicious app on the device

The fix

The receiver should be made non-exported or protected by a signature-level permission so only apps signed with the same key can send broadcasts to it.

How it was found

  1. Use Drozer to send information to the exported receiver and observe the response.
  2. Use the response to craft the right payload.

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 broadcast receiver is a component that any app on the phone can send messages to. Because this one was open, a malicious app could send it fake messages, potentially interfering with the app's normal operation.

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 b3nac

View all

6 more disclosed reports, best first.

More from Bitwarden

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.