Skip to content
Business logic Disclosed report Beginner

Protected Tweets setting overridden by Android app

The Android app overrides the 'Protect your Tweets' setting when a user changes other Direct Message settings, causing previously protected tweets to become public. An attacker could potentially exploit this by tricking a user into changing settings, though this is less likely than a previous bug.

alexiaya Follow

Originally disclosed on HackerOne

Bounty$560 Low 2.5 View original
  • Triaged in 5 days
  • Fixed in 24 days
  • Paid in 13 days
  • Disclosed after 48 days

Summary: Protected Tweets setting overridden by Android app

Description: The Android app overrides the "Protect your Tweets" setting set from outside the app in some cases when changing other settings.

Steps To Reproduce:

  1. Log in to an account with unprotected tweets on the Android app.
  2. Log in to the same account on mobile.twitter.com and turn on protected tweets.
  3. Confirm that the account's tweets are protected.
  4. In the Android app, go to the Direct Messages tab, click the gear icon and change a setting such as "Receive message requests" or "Show read receipts."
  5. The account's tweets are now unprotected.

If this does not work, you may have to first explicitly unset the protected tweets setting in the Android app before setting it elsewhere.

Impact:

This can cause a user's tweets to unknowingly become public. It is possible this could be exploited by an attacker asking the user to change their settings but that is less likely to succeed than with the previous bug where only changing the email address was required.

Impact

See above.

The original report as published on HackerOne, by alexiaya. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

The target is the official X (then Twitter) Android client, package com.twitter.android. The feature involved is the account-level "Protect your Tweets" setting, which controls whether an account's tweets are publicly visible or restricted to approved followers. The setting can be changed from several surfaces: the Android app itself, the mobile web client at mobile.twitter.com, and presumably other clients. The report is about the Android app disagreeing with, and silently overwriting, a value that was set from outside the app.

Setup

The researcher needed two things: an account with unprotected tweets, and access to the same account from both the Android app and mobile.twitter.com. No special tooling, proxy or version information is given in the report. The precondition that matters is the ordering of actions: the protected state must be set from outside the Android app, and then an unrelated settings change must be made inside the Android app.

Finding it

The report describes the Android app overriding the "Protect your Tweets" setting, when that setting was set from outside the app, in some cases when changing other settings. In other words, changing an unrelated Direct Message preference inside the app could flip the account's tweet visibility back to public. That is wrong on its face: a setting that the user enabled on another client should not be reset as a side effect of toggling something unrelated.

Exploitation

Step 1: Start from an unprotected account in the app

Log in to an account with unprotected tweets on the Android app. This establishes the app's own view of the account state as public.

Step 2: Protect the tweets from mobile web

Log in to the same account on mobile.twitter.com and turn on protected tweets. This is the out-of-band change that the app is expected to respect.

Step 3: Confirm the protected state

Confirm that the account's tweets are protected. At this point the server-side state is protected, and the web client reflects it.

Step 4: Change an unrelated DM setting in the app

In the Android app, go to the Direct Messages tab, click the gear icon and change a setting such as "Receive message requests" or "Show read receipts." Neither of these has anything to do with tweet visibility.

Step 5: Observe the tweets become public

The account's tweets are now unprotected. The unrelated settings change carried the app's stale notion of the protected-tweets value back to the server and overwrote the value that had been set on the web.

The researcher adds a caveat about reproducibility: if this does not work, you may have to first explicitly unset the protected tweets setting in the Android app before setting it elsewhere. The report gives this workaround without explaining why it helps.

Root cause

The report does not include code, requests or responses, so the mechanism can only be inferred. The report does not describe the mechanism, so the cause cannot be determined from it.

Impact

The impact is that a user's tweets can unknowingly become public. The researcher notes that an attacker could try to exploit this by asking the user to change their settings, but judges that less likely to succeed than a previous bug where only changing the email address was required. The researcher judges the social engineering route less likely to succeed than a previous bug where only changing the email address was required. The report was rated low severity with a CVSS of 2.5 and paid a bounty of 560.00 USD.

Fix

The report does not describe the fix that was applied.

Variants to test

  1. Other privacy toggles changed out of band: set a privacy-relevant option on the web client, then change an unrelated preference in the mobile app. A positive result is the web-set value silently reverting.
  2. Other settings screens in the same app: repeat the DM gear-icon flow from other tabs and sub-screens that write settings. A positive result is any screen whose save action also resets fields the user did not touch.
  3. Different client pairs: set the value on one client (web, another mobile platform, a third-party client) and change settings on another. A positive result is the same overwrite across any pair, which points at a shared whole-object update rather than one screen's bug.
  4. Ordering and staleness: change the setting out of band while the app is already running and holding cached state, versus after a fresh launch. A positive result is that the overwrite only happens when the app has been running since before the out-of-band change.

Hunting notes

This class of bug hides in settings and preferences screens that save more than the user edited, particularly where a mobile client caches account state locally. During recon, look for features with a server-side value that is also editable from more than one client: privacy flags, contact and notification preferences, and anything described as account-level. To show impact, demonstrate the state change end to end: set the value on one client, confirm it, perform an ordinary unrelated action on the other client, and show the value has flipped. That is the sequence in this report.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

What happened, in plain words

X (called Twitter at the time) has a setting called "Protect your Tweets". When it is on, only people you have approved as followers can see what you post. When it is off, anyone can read your posts. You can change this setting from more than one place: the Android phone app, the mobile website at mobile.twitter.com, and other clients.

The report describes the Android app overriding this setting in some cases. The trigger was not anything to do with privacy. It was changing an unrelated Direct Message preference inside the app, such as whether you receive message requests or show read receipts. After that ordinary action, an account whose tweets had been protected from the mobile website became public again.

Think of it like a shared shopping list on a fridge. You cross out "milk" on the paper list, but your flatmate is still holding an older copy in their head and writes the whole list back onto a fresh sheet, milk included.

The report was rated low severity, with a CVSS score of 2.5, and paid a bounty of 560.00 USD. It was disclosed on 17 May 2019.

Context

The target is the official X (then Twitter) Android client, whose package name is com.twitter.android. A package name is the unique identifier an app uses on Android, a bit like a surname that stops two apps with the same first name being confused.

The feature involved is the account-level "Protect your Tweets" setting. "Account-level" means the setting belongs to your whole account, not to one device. If you turn it on, it should be on everywhere: phone, browser, tablet. It controls whether your tweets are publicly visible or restricted to approved followers.

The setting can be changed from several surfaces: the Android app itself, the mobile web client at mobile.twitter.com, and presumably other clients. A "client" here just means any program you use to talk to X: the phone app, the website, a desktop tool.

The report is about the Android app disagreeing with, and silently overwriting, a value that was set from outside the app. "Silently" is the important word: the user gets no warning, no confirmation, no error. The change just happens.

Setup

The researcher needed two things: an account with unprotected tweets, and access to the same account from both the Android app and mobile.twitter.com. No special tooling, proxy or version information is given in the report.

A proxy, for context, is a program that sits between your app and the internet and lets you read or alter the traffic passing through. The researcher did not need one here, which is part of why this bug is interesting: it can be found by simply using the product.

The precondition that matters is the ordering of actions: the protected state must be set from outside the Android app, and then an unrelated settings change must be made inside the Android app. Order is everything.

Finding it

The report describes the Android app overriding the "Protect your Tweets" setting, when that setting was set from outside the app, in some cases when changing other settings. In other words, changing an unrelated Direct Message preference inside the app could flip the account's tweet visibility back to public.

That is wrong on its face: a setting that the user enabled on another client should not be reset as a side effect of toggling something unrelated. If you lock your front door, then adjust the thermostat, you do not expect the door to unlock.

Exploitation

Step 1: Start from an unprotected account in the app

Log in to an account with unprotected tweets on the Android app. This establishes the account as having unprotected tweets.

Step 2: Protect the tweets from mobile web

Log in to the same account on mobile.twitter.com and turn on protected tweets. This is the out-of-band change that the app is expected to respect. "Out-of-band" means it happened somewhere other than the app: a different client, a different route to the same account.

Step 3: Confirm the protected state

Confirm that the account's tweets are protected. At this point the server-side state is protected, and the web client reflects it. The server is the computer that stores the real, authoritative value. Checking here matters because it proves the change really took effect before the app is touched again.

Step 4: Change an unrelated DM setting in the app

In the Android app, go to the Direct Messages tab, click the gear icon and change a setting such as "Receive message requests" or "Show read receipts." Neither of these has anything to do with tweet visibility. Direct Messages are private one-to-one or group conversations, and these two preferences only control how message requests arrive and whether the sender sees that you have read a message.

Step 5: Observe the tweets become public

The account's tweets are now unprotected.

The researcher adds a caveat about reproducibility: if this does not work, you may have to first explicitly unset the protected tweets setting in the Android app before setting it elsewhere. The report gives this workaround without explaining why it helps.

Root cause

The report does not include code, requests or responses, so the mechanism can only be inferred. The report does not describe the mechanism, so the cause cannot be determined from it.

A "settings object" is a bundle of many settings grouped together, the way a form has many fields on one page. Sending the whole object means sending every field, including ones the user never touched.

"Authenticated" means the server has checked that the request really comes from the account holder, for example through a login session. "Writable" means the field is one the account owner is allowed to change.

Impact

The impact is that a user's tweets can unknowingly become public.

The researcher notes that an attacker could try to exploit this by asking the user to change their settings, but judges that less likely to succeed than a previous bug where only changing the email address was required. The researcher judges the social engineering route less likely to succeed than a previous bug where only changing the email address was required. "Social engineering" means manipulating a person into doing something, rather than attacking the software directly.

The report was rated low severity with a CVSS of 2.5 and paid a bounty of 560.00 USD. CVSS is a standard scoring system for how serious a vulnerability is; 2.5 is on the low end.

Fix

The report does not describe the fix that was applied.

Variants to test

  1. Other privacy toggles changed out of band: set a privacy-relevant option on the web client, then change an unrelated preference in the mobile app. A positive result is the web-set value silently reverting.
  2. Other settings screens in the same app: repeat the DM gear-icon flow from other tabs and sub-screens that write settings. A positive result is any screen whose save action also resets fields the user did not touch.
  3. Different client pairs: set the value on one client (web, another mobile platform, a third-party client) and change settings on another. A positive result is the same overwrite across any pair, which points at a shared whole-object update rather than one screen's bug.
  4. Ordering and staleness: change the setting out of band while the app is already running and holding cached state, versus after a fresh launch. A positive result is that the overwrite only happens when the app has been running since before the out-of-band change. "Cached" means stored locally for speed, so the app does not have to ask the server every time.

Hunting notes

This class of bug hides in settings and preferences screens that save more than the user edited, particularly where a mobile client caches account state locally. During recon, look for features with a server-side value that is also editable from more than one client: privacy flags, contact and notification preferences, and anything described as account-level. "Recon" is the early phase of looking around a product to see what it does and where the interesting parts are.

An "endpoint" is a specific address on a server that accepts a particular kind of request, like a counter at a bank that handles one type of transaction. A "payload" is the data you send in that request.

To show impact, demonstrate the state change end to end: set the value on one client, confirm it, perform an ordinary unrelated action on the other client, and show the value has flipped. That is the sequence in this report.

Glossary

  • Account-level setting: a preference that belongs to your whole account and applies on every device and client, not just one.
  • Android package name: the unique identifier of an app on Android, here com.twitter.android.
  • Authenticated: a request the server has verified comes from the logged-in account owner.
  • Bounty: a payment a company makes to a researcher who reports a valid security issue.
  • Cached / stale: stored locally for speed and therefore possibly out of date compared with the server.
  • Client: any program used to talk to a service, such as a phone app or a website.
  • CVSS: a standard scoring system for the severity of a vulnerability; 2.5 is low.
  • Direct Messages: private conversations between users on X.
  • Endpoint: a specific address on a server that accepts a particular kind of request.
  • Out-of-band: done through a different route or client than the one being examined.
  • Payload: the data sent inside a request.
  • Proxy: a program that sits between an app and the internet and can read or alter the traffic.
  • Recon: the early exploration phase of a security test, mapping out what a product does.
  • Settings object: a bundle of many settings sent together, rather than one field at a time.
  • Social engineering: manipulating a person into taking an action, instead of attacking software directly.
  • Surface: one of the places from which a feature can be used, such as the app or the website.
  • Writable: a field the account owner is allowed to change.

More by alexiaya

View all

2 more disclosed reports, 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.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.