twitter android app Fragment Injection
An exported Android activity in the Twitter app extends PreferenceActivity and allows an attacker to load arbitrary internal fragments by supplying an extra intent. This could cause the app to crash and potentially invoke unintended fragment functionality.
Originally disclosed on HackerOne
- Triaged in 20 days
- Fixed in 41 days
- Paid in 22 days
- Disclosed after 3 months
com.twitter.android.WidgetSettingsActivity extend PreferenceActivity and export. By entering the appropriate extra intent can call any of its internal fragment. So do not export com.twitter.android.WidgetSettingsActivity (http://securityintelligence.com/new-vulnerability-android-framework-fragment-injection)
POC:(can make app crash) private void testtwitter(){ Intent i = new Intent(); i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); i.setClassName("com.twitter.android","com.twitter.android.WidgetSettingsActivity"); i.putExtra(":android:show_fragment","com.samsung.android.sdk.pen.objectruntime.preload.VideoIntentFragment"); //i.putExtra("confirmcredentials",false); startActivity(i); }
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 exported activity extends PreferenceActivity and processes a fragment name from an intent extra without restricting which fragments can be loaded.
Impact
An attacker could cause the Twitter app to crash and may be able to invoke unintended internal fragment functionality.
What the attacker needed
Attacker app installed on the same device
The fix
The activity should not be exported, or it should validate and restrict which fragments can be loaded.
How it was found
- Create an intent and set its class to the exported Twitter activity.
- Add an extra that specifies an internal fragment class name.
- Start the activity, which loads the fragment and can crash the app.
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 certain screens (activities) to other apps on the phone. This report says one Twitter screen was exposed and accepted instructions to load internal pieces of the app (fragments) that should not be reachable from outside. An attacker could use this to make the app misbehave or crash.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.