Twitter for android is exposing user's location to any installed android app
Twitter for Android broadcasts the user's location to all installed apps without requiring any permission, allowing any malicious app to track the user's location without permissions.
- Triaged in 3 days
- Fixed in 4 days
- Paid in 5 days
- Disclosed after 47 days
Hi,
I have noticed that while a user is using the location feature in twitter's android application twitter is sending the user's location to all other locally installed applications without verifying the possible (malicious) receivers (By sending a broadcast). As a poc I have created an application (attached) which asks for no permissions from android and is just listening to location broadcasts sent by twitter. You can see both the application's apk and its code attached. I have also created a poc video which shows how to use it - I have used an android emulator but it can also be used by a real device. Here is the video: https://vimeo.com/193261287 pass is: twittergps121 It can be seen in the video that the moment twitter asks for(and receives) gps signal - my malicious application is receiving it due to twitter forwarding this location - also my app has no permissions assigned.
Note: I am sending the coordinates to my emulator manually - but on a real device which allows twitter to use location it is sent automatically.
Vulnerable code
This is happening because of the following lines in your app's code:
paramLocation = new Intent("com.twitter.library.geo.LOCATION_CHANGED").putExtra("com.twitter.library.geo.LOCATION_EXTRA", paramLocation);
this.c.sendBroadcast(paramLocation);
Some variable names might be wrong due to obfuscation but the idea remains - you should probably add permission to the broadcast.
Implications
Any malicious application installed on a user's device can track the user's location without any permissions if the user is allowing twitter to access his location.
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 app uses an implicit broadcast to share location updates without restricting receivers via a permission.
Impact
Any malicious app on the device can track the user's location without any permissions if the user allows Twitter to access their location.
What the attacker needed
Twitter app installed and location enabled; Malicious app installed on same device; User allows Twitter to access location
The fix
The broadcast should be protected with a permission so only authorised receivers can get it.
How it was found
- Create a malicious app that listens for location broadcasts from Twitter.
- Install the malicious app on the same device as Twitter.
- Use Twitter's location feature to trigger a location broadcast.
- Observe the malicious app receiving the location without any permissions.
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.
When you use Twitter's location feature, the app sends your location to other apps on your phone. Normally, apps need your permission to get your location, but here any app can listen in without asking. This means a bad app could track where you are without you knowing.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.