Changing email address on Twitter for Android unsets "Protect your Tweets"
Verifying a new email address on Twitter for Android unsets the 'Protect your Tweets' option, making the user's tweets publicly visible. An attacker could exploit this by tricking a user into changing their email via phishing, leading to unintended public exposure of private tweets.
- Triaged in 8 days
- Fixed in 24 days
- Paid in 10 days
- Disclosed after 24 days
NOTE! Thanks for submitting a report! Please replace all the [square] sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to triage and respond quickly, so be sure to take your time filling out the report!
Summary: Verifying email address on Twitter for Android unsets "Protect your Tweets"
Description: Verifying a new email address on a Twitter account in the Android app causes the "Protect your Tweets" option to be unset, resulting in the user's tweets being made publicly visible.
Steps To Reproduce:
(Add details for how we can reproduce the issue)
- Log in to a Twitter account on the Android app.
- Make sure the app is set to handle twitter.com links.
- Change the email address on the account.
- Verify the new email address by clicking the link in the email from the same Android device.
Impact: This can lead to a user's private tweets being exposed to the public until they realize this happened. An attacker does not need to be involved as they would need to have access to the user's account to change the email, but a user could be tricked into changing their email if an attacker sent them a phishing email telling them to do so.
Supporting Material/References:
- List any additional material (e.g. screenshots, logs, etc.)
Impact
This can lead to a user's private tweets being exposed to the public until they realize this happened. An attacker does not need to be involved as they would need to have access to the user's account to change the email, but a user could be tricked into changing their email if an attacker sent them a phishing email telling them to do so.
Context
Twitter for Android is the official mobile client for the Twitter service. Among the account settings it exposes is "Protect your Tweets", the switch that makes an account's tweets visible only to approved followers. The setting is a privacy control, so any code path that changes it without the user asking is a security issue rather than a cosmetic bug.
The report concerns the email address change flow. When a user changes the email address on their account, Twitter sends a verification link to the new address, and the account is only updated once that link is followed. The researcher found that on the Android app, completing that verification also clears the "Protect your Tweets" option.
Setup
The preconditions are simple and all client side:
- A Twitter account, logged in through the Android app.
- The Android app is configured as the handler for
twitter.comlinks, so that a link opened on the device is passed to the app rather than to a browser. - Access to the mailbox of the new email address, on the same Android device.
No special tooling, proxy or modified client is described. The test is performed entirely through the normal app and the normal verification email.
Finding it
The report states that verifying a new email address from the Android app unsets "Protect your Tweets", making the account's tweets publicly visible. Because the two actions (verifying an email, protecting tweets) are unrelated from the user's point of view, the change is easy to miss: the user believes they only confirmed a new address.
Exploitation
Step 1: Log in on the Android app
Log in to the target Twitter account in the Android app. The account must already have "Protect your Tweets" enabled for the effect to be observable.
Step 2: Make the app handle twitter.com links
Ensure the app is set to handle twitter.com links. This matters because the verification link in the email points at Twitter, and the app must be the component that opens it for the bug to trigger.
Step 3: Change the email address
Change the email address on the account from within the app. This starts the normal verification flow: Twitter sends a message to the new address containing a link that must be followed to confirm ownership.
Step 4: Verify the new address from the same device
Open the verification email on the same Android device and click the link. Because the app is registered for twitter.com links, the link is handed to the app, which completes the verification. At this point the "Protect your Tweets" option is unset and the account's tweets become publicly visible.
The report contains no HTTP requests, responses, parameters or headers; the behaviour is described purely in terms of the four user actions above.
Root cause
The report does not identify the code responsible.
Impact
The direct consequence is that a user's private tweets become publicly visible until the user notices and re-enables protection. The report says private tweets can be exposed to the public until the user realises this happened.
The researcher is explicit about the limits. An attacker does not need to be involved, because changing the email requires access to the account in the first place. The realistic attack path is social: an attacker who sends a phishing email persuading the user to change their email address could cause the same effect, and the user's protected tweets would then be public without the attacker ever holding the credentials. The report does not claim mass scraping, follower enumeration or any other secondary impact.
Fix
The report does not describe a fix or a vendor response.
Variants to test
- Other account settings changed through a verification or confirmation link: check whether privacy flags such as protected tweets, discoverability or direct message permissions are reset when the confirmation completes. A positive result is a setting that differs before and after the confirmation with no user action on that setting.
- The same flow through a browser instead of the app: if the app-only precondition in step 2 is what triggers the bug, the browser path should leave the setting intact, which helps localise the fault to the client.
- Email change followed by verification on a different device: compare the resulting account state with the same-device case to see whether the deep link handling is the deciding factor.
- Other deep-linked confirmation flows (password reset confirmations, login approvals) that land in the app: a positive result is any of them mutating account state beyond the action being confirmed.
Hunting notes
This class of bug hides in multi-step account flows where a confirmation step performs a broader account update than its name suggests: email verification, password reset confirmation, login approval and similar links. The signal during testing is a privacy or security setting that changes after an unrelated action, which is easiest to spot by recording the account's settings before and after each flow rather than only checking that the flow succeeded.
The report states that verifying a new email address unsets "Protect your Tweets", making tweets publicly visible. That framing, plus the honest statement that no attacker is required and that phishing is the plausible delivery route, is what makes the severity legible to the program without overstating it.
Summary
| Item | Detail |
|---|---|
| Program | X / xAI (HackerOne) |
| Asset | com.twitter.android |
| Weakness | Privacy Violation |
| Severity | Low |
| Bounty | 2,940.00 USD |
| Researcher | alexiaya |
| Disclosed | 2019-01-18 |
What happened, in plain words
Twitter has a privacy switch called "Protect your Tweets". When it is on, only people the account owner has approved as followers can see that account's tweets. When it is off, anyone can read them. It is a setting the user chooses deliberately, so anything that flips it without the user asking is a security problem, not a cosmetic one.
The researcher found that on the Twitter for Android app, changing the email address on an account and then confirming the new address had a side effect: the "Protect your Tweets" switch was turned off. The user only meant to confirm a new email address, but their tweets became public anyway.
A few terms before we go further:
- Twitter for Android is the official Twitter app for Android phones. It is a program installed on the phone that talks to Twitter's servers over the internet.
- Email verification is the usual way a website checks that an email address really belongs to you. You type the new address, the site sends a message to it containing a special link, and you click that link to prove you can read mail sent there.
- Deep link is a link that, instead of opening a web page in a browser, opens a specific app on the phone. Apps can register themselves as the handler for links to a certain domain, so a
twitter.comlink can be passed straight to the Twitter app.
The report is short and describes the bug purely in terms of what a user does with the phone. There are no network requests, parameters or headers in it; the whole finding is four user actions and their unexpected result.
Context
Twitter for Android is the official mobile client for the Twitter service. Among the account settings it exposes is "Protect your Tweets", the switch that makes an account's tweets visible only to approved followers. The setting is a privacy control, so any code path that changes it without the user asking is a security issue rather than a cosmetic bug.
The report concerns the email address change flow. When a user changes the email address on their account, Twitter sends a verification link to the new address, and the account is only updated once that link is followed. The researcher found that on the Android app, completing that verification also clears the "Protect your Tweets" option.
In plain terms: the app has two separate features. One lets you change the email address on your account. The other lets you decide whether your tweets are private. The bug is that finishing the first one quietly changes the second one.
Setup
The preconditions are simple and all client side. "Client side" means they concern the phone and the app on it, not anything special on Twitter's servers.
- A Twitter account, logged in through the Android app.
- The Android app is configured as the handler for
twitter.comlinks, so that a link opened on the device is passed to the app rather than to a browser. - Access to the mailbox of the new email address, on the same Android device.
No special tooling, proxy or modified client is described. The test is performed entirely through the normal app and the normal verification email.
Why each precondition matters:
- You need to be logged in because the setting belongs to an account, and the app can only change settings on an account it is signed in to.
- The privacy switch must already be on, otherwise you cannot see it being turned off. If it was off before and off after, nothing observable happened.
- The app must handle
twitter.comlinks, because the confirmation link in the email points at Twitter. - The mailbox must be reachable on the same phone, because the test is about clicking the link on the same device where the app is installed.
Finding it
The report states that verifying a new email address from the Android app unsets "Protect your Tweets", making the account's tweets publicly visible. Because the two actions (verifying an email, protecting tweets) are unrelated from the user's point of view, the change is easy to miss: the user believes they only confirmed a new address.
Think of it like a bank app where changing your postal address also, silently, switches off the setting that hides your balance from other people. You did one thing, and a second, unrelated thing changed behind your back.
Exploitation
Step 1: Log in on the Android app
Log in to the target Twitter account in the Android app. The account must already have "Protect your Tweets" enabled for the effect to be observable.
This step is just the starting point: the app needs to be signed in to the account whose settings we are watching. The important part is the "already enabled" condition, because the bug is visible only as a change from on to off.
Step 2: Make the app handle twitter.com links
Ensure the app is set to handle twitter.com links. This matters because the verification link in the email points at Twitter, and the app must be the component that opens it for the bug to trigger. If a browser handles the link instead, the described behaviour is not reproduced.
On Android, when you tap a link, the system decides which app opens it. Apps can declare that they handle links for a particular domain, and the phone then offers or uses that app. Here the app must be the one that receives the twitter.com link, because the faulty behaviour lives in the app's handling of that link.
Step 3: Change the email address
Change the email address on the account from within the app. This starts the normal verification flow: Twitter sends a message to the new address containing a link that must be followed to confirm ownership.
Nothing unusual happens here. The point of the step is to put the account into the state where a verification link is waiting to be clicked, so that step 4 can exercise the app's handling of it.
Step 4: Verify the new address from the same device
Open the verification email on the same Android device and click the link. Because the app is registered for twitter.com links, the link is handed to the app, which completes the verification. At this point the "Protect your Tweets" option is unset and the account's tweets become publicly visible.
This is where the bug shows itself. The user did exactly what the email asked: clicked the confirmation link. The email address was confirmed, and as an unrequested side effect the privacy switch was cleared. The report contains no HTTP requests, responses, parameters or headers; the behaviour is described purely in terms of the four user actions above.
Root cause
The report does not identify the code responsible.
Two ideas in that paragraph are worth unpacking for a newcomer:
- An endpoint is a specific address on a server that a program sends a request to, in order to do one job. "Change my email" and "confirm my email" would each be a different endpoint. The report does not name any endpoint; it only says the fault lies in the app's verification path or the endpoint it calls.
- A default value is what a setting is assumed to be when nobody says otherwise. If the code that saves the account after verification builds a full picture of the account and fills in the privacy flag with its default, which is off, then saving that picture turns the flag off, even though the user never touched it. The user's real choice is overwritten by a default.
Impact
The direct consequence is that a user's private tweets become publicly visible until the user notices and re-enables protection. The report says private tweets can be exposed to the public until the user realises this happened.
The researcher is explicit about the limits. An attacker does not need to be involved, because changing the email requires access to the account in the first place. The realistic attack path is social: an attacker who sends a phishing email persuading the user to change their email address could cause the same effect, and the user's protected tweets would then be public without the attacker ever holding the credentials.
Some terms here:
- Phishing is a message that pretends to come from a service you trust and asks you to do something, such as "please update your email address here". The goal is to get the person to act, not to break in technically.
- Credentials are the things that prove who you are when logging in, typically a username and password. The report's point is that the attacker never needs them: the user does the work.
The report does not claim mass scraping, follower enumeration or any other secondary impact. In other words, it does not say that an attacker could collect many users' tweets at scale or list who follows whom; it only describes the privacy switch being turned off and the tweets becoming public.
Fix
If it must carry something, it should carry the value the user already had, not a default.
Variants to test
These are follow-up checks a tester could run to see whether the same kind of mistake exists elsewhere. Each one is described as a test and as what a positive result looks like.
- Other account settings changed through a verification or confirmation link: check whether privacy flags such as protected tweets, discoverability or direct message permissions are reset when the confirmation completes. A positive result is a setting that differs before and after the confirmation with no user action on that setting.
- The same flow through a browser instead of the app: if the app-only precondition in step 2 is what triggers the bug, the browser path should leave the setting intact, which helps localise the fault to the client.
- Email change followed by verification on a different device: compare the resulting account state with the same-device case to see whether the deep link handling is the deciding factor.
- Other deep-linked confirmation flows (password reset confirmations, login approvals) that land in the app: a positive result is any of them mutating account state beyond the action being confirmed.
A note on the wording: "localise the fault" means working out which part of the system is responsible. If the bug appears only when the app opens the link and not when a browser does, the fault is in the app's handling, not in the server's confirmation logic. "Mutating account state" simply means changing something stored about the account, such as a setting.
Hunting notes
This class of bug hides in multi-step account flows where a confirmation step performs a broader account update than its name suggests: email verification, password reset confirmation, login approval and similar links. The signal during testing is a privacy or security setting that changes after an unrelated action, which is easiest to spot by recording the account's settings before and after each flow rather than only checking that the flow succeeded.
That last point is the practical lesson. Most people testing a feature only ask "did it work?". Here the flow did work: the email was verified. The bug was in what else changed. Writing down the account's settings before the flow and comparing them afterwards turns an invisible side effect into a visible difference.
The report states that verifying a new email address unsets "Protect your Tweets", making tweets publicly visible. That framing, plus the honest statement that no attacker is required and that phishing is the plausible delivery route, is what makes the severity legible to the program without overstating it.
Summary
| Item | Detail |
|---|---|
| Program | X / xAI (HackerOne) |
| Asset | com.twitter.android |
| Weakness | Privacy Violation |
| Severity | Low |
| Bounty | 2,940.00 USD |
| Researcher | alexiaya |
| Disclosed | 2019-01-18 |
Glossary
- API: a defined set of addresses and rules that one program uses to ask another program to do something, such as "change this account's email address".
- Asset: the specific product or piece of software a bug report is about. Here it is
com.twitter.android, the Android app's package name. - Bug bounty: a programme where companies pay researchers for reporting security problems to them.
- Client: the program on the user's own device, as opposed to the server. The Twitter for Android app is the client here.
- Client side: happening on the user's device rather than on the company's servers.
- Credentials: the information that proves who you are when logging in, typically a username and password.
- CVSS: a standard scoring system for rating the severity of a security issue. The report gives no score.
- Deep link: a link that opens a specific app on the phone instead of a web page in a browser.
- Default value: the value a setting takes when nobody has chosen otherwise.
- Endpoint: a specific address on a server that a program sends a request to in order to perform one job.
- Email verification: the process of proving you can read mail sent to an email address, usually by clicking a link sent to it.
- Exploitation: carrying out the steps that trigger a vulnerability, to show it is real.
- Follower: a Twitter user who has subscribed to see another account's tweets.
- Header: extra information sent alongside a web request or response, such as the type of content. The report contains none.
- HTTP request: a message a program sends to a server asking it to do something. The report contains none.
- Impact: the harm a vulnerability can cause if it is used.
- Parameter: a named value sent with a request, such as an email address. The report contains none.
- Phishing: a message pretending to be from a trusted service that persuades the recipient to take an action, such as changing their email address.
- Privacy Violation: the weakness category given to this report, meaning a privacy setting or private information was exposed or altered without the user's intent.
- Protected tweets: tweets visible only to followers the account owner has approved.
- Proxy: a tool that sits between a program and a server and records or alters the traffic. None is used in this report.
- Regression: a bug where something that used to work correctly stops working after a change.
- Root cause: the underlying reason a bug happens, as opposed to its visible symptom.
- Severity: how serious a vulnerability is judged to be. This one is rated low.
- Side effect: an unintended change caused by an action that was meant to do something else.
- Triage: the first review of a report, where the receiving team checks it is valid and decides how to handle it.
- Vendor response: the company's reply to a report, such as confirming, fixing or closing it. The report does not include one.
- Vulnerability: a flaw in software that lets something happen that the user or the company did not intend.
- Weakness: the general category of a flaw, used to group similar reports together.