Skip to content
RCE Disclosed report Intermediate

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.

miantaiduo Follow

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); }

The original report as published on HackerOne, by miantaiduo. 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 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

  1. Create an intent and set its class to the exported Twitter activity.
  2. Add an extra that specifies an internal fragment class name.
  3. 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.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.