Skip to content
Account takeover Disclosed report Intermediate

getting emails of users/removing them from victims account [using typical attack]

The report describes a brute-force attack against a unique code in Twitter's 'not my account' email link, which can disclose a user's email address. By sending many notification emails, an attacker increases the chance of guessing the correct code, and the code does not expire.

akhil-reni Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 10 days
  • Paid in 11 days
  • Disclosed after 4 months

Hey Hi,

I would like to explain a typical type of attack combined with a brute force attack leading to email disclosure. conditions : should be having email notifications ON .

Every time someone follows me , favs my tweet i get a notification on my email, and the footer of the email . click here if this email is not signed up.

https://twitter.com/account/not_my_account/[account_name]/D26H5-DAH4C-141579

Every notification email has a different unique Code. But the probability of getting the right is very LOW. But when we send 1000 email notifications to the victim(by fav and un-fav continuously on a particular tweet )
the probability decreases a bit, and when the email notifications are increased the probability of getting the right code gets HIGH!

chances of getting the right code ∝ number of notification emails.

This whole process can be simply automated using PHP or python, making it more easy.

Faults in the system:

  1. a unique code is generated every time, 5 secs 5 notification emails = 5 different codes. Fix suggested: The code generated should be the same for like next 1 hour

  2. The code doesn't expire. i dig'd into one of my old twitter notification emails and seen that the code is still active. Fix suggested : Expire tokens ASAP!

  3. Getting the right discloses the email. whenever i get the right code, the email is disclosed. For example: for username @test entering the right code discloses "If you did not sign up for the Twitter account "test", please confirm so that we may remove your email address [email protected] from this account. " Fix suggested : use *** instead something like te****@gmail.com

  4. if a user removes an email , the code should immediately get expired . if we hit the right code it still discloses the old email. something like this: "Your email has been removed. Your email ([email protected]) has been removed from the Twitter account "test".

You will no longer receive Twitter notifications intended for this account."

Thanks, Karthik wesecureapp

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

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 'not my account' code does not expire and is not invalidated, allowing brute-force guessing.

Impact

An attacker could disclose a user's email address and potentially remove it from the account, but the attack requires many notifications and the probability of success is low.

What the attacker needed

Victim has email notifications enabled; attacker can trigger notifications (e.g.…; attacker can send many requests

The fix

The code should be reused for a period, expire quickly, be masked in the response, and be invalidated when the email is removed.

How it was found

  1. Ensure the victim has email notifications enabled.
  2. Trigger many notification emails to the victim by repeatedly favouriting and unfavouriting a tweet.
  3. Brute-force the 'not my account' link using the collected codes.
  4. When the correct code is found, the victim's email address is disclosed.

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 get a Twitter 'not my account' email, its link has a secret code. The report says an attacker can guess it by sending many notifications, because the code never expires. If they guess right, the linked email address is shown.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by akhil-reni

View all

13 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.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.