Shopify android client all API request's response leakage, including access_token, cookie, response header, response body content
The Shopify Android app used an unprotected implicit broadcast to share API response data, allowing any installed app to register a receiver and silently capture cookies and access tokens. An attacker could then take over the user's account.
- Triaged in 5 days
- Fixed in 53 days
- Paid in 5 days
- Disclosed after 3 months
Shopify android client all API request's response leakage, including access_token, cookie, response header, response body content and much other information. An attacker can extract cookie and access_token of Shopify android client without any permission needed and user awareness.
#Bug impact:
A malicious android app can extract cookie and access_token and other user sensitive information in Shopify android client, and thus taking control of user's account.
Bug demostration (see two screenshots with stolen cookie in http headers printed in logcat and access_token).
#Bug explaination:
The shopify client use implicit broadcast to communicate intra-app to pass network request's response infromation, with action "com.shopify.service.requestComplete". However this broadcast is not protected by permission, thus any android client can register a broadcast receiver and monitor response information, extracting sensitive account credentials.
The broadcast is send at com/shopify/service/netcomm/NetworkService, recvd at multiple points. including com/shopify/service/BaseRequestDelegate$RequestCompletionBroadcastReceiver$1.
#Steps to reproduce:
- Install the poc apk and shopify client, poc apk registered a receiver and monitor in background
- Open shopify and login, the poc apk will now receives user's admin_cookie and access_token silently, print them in logcat as demonstrated in screenshots. Of course the attacker can send it to remote control center and fully take control of user's account.
- As user operates the attacker can receives other response information.
- logcat command: adb logcat -s SHOPIFYHACK:V
#Fix recommendations:
Use signature level permission to protect the broadcast, or use a LocalBroadcastManager
POC apk attached, tested on Nexus 5 4.4.4. No special permission or root required. No user interactions and awareness.
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 app used an implicit broadcast without a permission to pass sensitive network response data between its own components.
Impact
A malicious app could extract cookies and access tokens and other sensitive information, potentially taking full control of the user's account.
What the attacker needed
Malicious app installed on same device; victim logs into Shopify app; no special permissions or root needed
The fix
The broadcast should be protected with a signature-level permission or replaced with LocalBroadcastManager.
How it was found
- Install the proof-of-concept app and the Shopify client; the proof-of-concept app registers a receiver and monitors in the background.
- Open Shopify and log in; the proof-of-concept app silently receives the admin cookie and access token and prints them to logcat.
- As the user operates the app, the attacker receives other response information.
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 send messages called broadcasts to other parts of the system. If a broadcast is not protected, any other app on the phone can listen to it. Here, the Shopify app sent sensitive login data in such a broadcast, so a malicious app could listen and steal the user's account.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.