Skip to content
Access control Disclosed report Intermediate

Twitter lite(Android): Vulnerable to local file steal, Javascript injection, Open redirect

An exported Android activity in Twitter Lite accepted unvalidated URIs passed through an intent, allowing a malicious app to load local files, inject JavaScript, or redirect to an attacker site. This could let an attacker steal the user's session token or local files.

Rahul Kankrale Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 14 days
  • Fixed in 35 days
  • Paid in 22 days
  • Disclosed after 2 months

Summary: com.twitter.android.lite.TwitterLiteActivity is set to exported and doesn't validate data pass to intent due to which this activity vulnerable to steal users local files, javascript injection and open redirect.

Description: com.twitter.android.lite.TwitterLiteActivity is set to exported so external app can communicate with it. As this activity doesn't validate data pass through intent critical uri like javascript and file so malicious app can steal users files as well as inject javascript. It can leads to many issue like UXSS, Token steal, etc.

Steps To Reproduce:

  1. To reproduce we use ADB tool

  2. To reproduce local file access use: adb shell am start -n com.twitter.android.lite/com.twitter.android.lite.TwitterLiteActivity -d "file:///sdcard/BugBounty/1.html"

  3. To reproduce javascript injection: adb shell am start -n com.twitter.android.lite/com.twitter.android.lite.TwitterLiteActivity -d "javascript://example.com%0A alert(1);"

  4. To reproduce open redirect: adb shell am start -n com.twitter.android.lite/com.twitter.android.lite.TwitterLiteActivity -d "http://evilzone.org"

  • Video of POC attached.

Thanks

Impact

As critical uri like javascript & file is not being validate malicious app can steal users session token, users files etc.

Attachments

Screenrecorder-2019-02-21-21-41-11-973.mp4 From the original on HackerOne

The original report as published on HackerOne, by rahulkankrale. 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 exported activity did not validate or restrict the URI scheme and host passed via the intent data.

Impact

A malicious app could steal the user's session token or local files, and could inject JavaScript leading to issues such as UXSS.

What the attacker needed

Malicious app installed on the device

How it was found

  1. Use the ADB tool to interact with the device.
  2. Start the Twitter Lite activity with a file URI to access a local file.
  3. Start the activity with a javascript URI to inject script.
  4. Start the activity with an external http URI to cause an open redirect.

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.

On Android, an 'exported' activity can be started by any other app on the phone. This Twitter Lite activity took a web address from the calling app without checking it, so a malicious app could make it open local files or run JavaScript, which could expose the user's data.

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 Rahul Kankrale

View all

1 more disclosed report, best first.

More from X / xAI

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.