Delete direct message history without access the proper conversation_id
A direct message conversation identifier is built by joining the two user ids with a hyphen, and swapping their order produced a different identifier that still pointed at the same conversation. Clicking delete on that swapped view removed the entire original conversation history, even though the user never took the normal route to leave it.
Originally disclosed on HackerOne
- Triaged in 6 days
- Fixed in 15 months
- Paid in 20 days
- Disclosed after 16 months
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: [add summary of the vulnerability] An user can invert the user ids from a direct message URL, which is the conversation_id, and delete the whole conversation history without using the proper conversation_id and without a proper feedback to the user.
Description: [add more details about this vulnerability] By having a direct message to any user, Twitter creates a specific id to this conversation. The conversation_id. This id is concatenation between the two user ids in this conversation separated by an hyphen . For example:
#1 - user_id = 12345 #2 - user_id = 45678 conversation_id=12345-45678
If an user invert these numbers(e.g: in our example 45678-12345) the user is asked to either accept to receive message from an undefined user or to delete it.(Attached print1). After clicking "Delete" the whole conversation history from the original conversation is deleted without ever following the happy path to proper leave a conversation.
Steps To Reproduce:
(Add details for how we can reproduce the issue)
- Have a conversation (Direct Message) between two users.
- Click on the conversation to open the chat window.
- The URL will change and it's going to be something like: https://twitter.com/messages/123456-78910
- Invert those numbers on the conversation_id and the new URL will be like: https://twitter.com/messages/78910-123456 and press enter to go to this URL.
- User will be asked to either Accept or Delete if he want to let an undefined user to message him. With all the options above as well, like user info. However is an undefined user. The message will be exactly:
Do you want to let message you? They won’t know you’ve seen their message until you accept.Report conversation
You can see there is a blank space between the words 'let' and 'message'. 6. If the user clicks on 'Delete' the original history from the original conversation is deleted(attached image: after_Deleting.png) and the feedback gave to the user doesn't mention this.
Impact: [add why this issue matters]
Since we didn't use the proper conversation_id to delete the conversation this action might create an inconsistence on the conversations database.
Supporting Material/References:
- List any additional material (e.g. screenshots, logs, etc.)
Impact
An attacker could create an inconsistence on the conversation data since we used a wrong conversation_id to delete the history. Maybe this issue could lead to other exploits since we had a info icon for an undefined user.
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 server treated the conversation identifier as an unordered pair of user ids, so both orderings resolved to the same conversation, and the delete action on the reversed form removed the shared history.
Impact
The reporter suggests this could create an inconsistency in the conversation data, and possibly lead to other exploits, but no wider impact is demonstrated.
What the attacker needed
An existing direct message conversation; victim opens a crafted messages URL; victim clicks delete on the prompt
How it was found
- Open an existing direct message conversation between two users.
- Note the conversation identifier in the page URL.
- Swap the order of the two numbers in that identifier and load the resulting URL.
- The page asks whether to accept or delete messages from an undefined user.
- Choose delete and the original conversation history is removed.
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.
A direct message chat between two people gets an identifier made from both people's account numbers, joined with a dash. The reporter found that writing those two numbers in the opposite order still opened the same chat, and choosing to delete it wiped the real chat history. The normal way to leave a chat was skipped, so the deletion happened through an unexpected path.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.