hardcoded api secret & api key in com.reddit.frontpage
The Reddit Android app shipped Twitter consumer key and secret values inside its compiled string resources. Anyone who extracted the app could read those credentials and use them to obtain a Twitter bearer token.
- Disclosed after 4 months
hi security team, in file Resources/Resources.arsc/res/values/strings.xml i have found <string name="twitter_consumer_key">███</string> <string name="twitter_consumer_secret">███</string>
It shouldn't be disclosed to third parties it meant for deveoplers as per https://developer.twitter.com/en/docs/authentication/oauth-2-0/bearer-tokens
poc:- curl --user "██████:███" --data 'grant_type=client_credentials' 'https://api.twitter. com/oauth2/token'
response:- {"token_type":"bearer","access_token":"████"}
it meant to request successful as official docs say https://developer.twitter.com/en/docs/authentication/oauth-2-0/bearer-tokens
Impact
leakage of twitter_consumer_key and twitter_consumer_secret to public it meant for deveoplers only
Attachments


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 Twitter consumer key and secret were hardcoded into the app's string resources instead of being kept server-side.
Impact
The Twitter consumer key and secret were exposed to anyone who downloaded the app, allowing them to request bearer tokens with Reddit's developer credentials.
What the attacker needed
Download of the Reddit Android app
How it was found
- Extract the app package and open the compiled string resources file.
- Locate the twitter_consumer_key and twitter_consumer_secret entries.
- Use those values against Twitter's OAuth2 token endpoint to request a bearer token.
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.
Apps often bundle fixed strings, such as API keys, inside their package. If those strings are secrets, anyone who downloads the app can pull them out and use them. Here the reporter found Twitter developer credentials in the app and showed they still worked to get an access token.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.