Multiple CSRF vulnerabilities in Facebook Messenger
Facebook Messenger's web interface lacked CSRF protection on endpoints for sending messages and deleting threads. An attacker could force a logged-in user to send messages to any user or delete any messaging thread without their knowledge.
Meta
Published on blog.mazinahmed.net
In this post, I will demonstrate the findings of multiple interesting cross-site request forgery vulnerabilities I identified on Facebook. These vulnerabilities allow an attacker to force the victim to do various actions.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Messenger endpoints did not require a CSRF token or other proof that the request originated from the legitimate site.
Impact
An attacker could force a logged-in user to send messages to any user or delete any messaging thread without the user's knowledge.
What the attacker needed
Victim is logged into Messenger; victim visits attacker's page
How it was found
- Create a malicious HTML page with a form that auto-submits to the send_messages endpoint.
- Set the form fields to specify the sender, recipient, and message body.
- Trick a logged-in Messenger user into visiting the page, causing the message to be sent.
- For deletion, create a similar form targeting the delete_thread endpoint with the victim's thread ID.
- Trick the victim into visiting the page, causing the thread to be deleted.
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 write-up has not been written yet. The Original tab links to the source.
Cross-site request forgery (CSRF) is when a malicious website makes a logged-in user's browser send a request to another site without the user intending to. Here, the Messenger website accepted requests to send messages and delete threads without checking they came from the real site, so an attacker could trick a victim into performing those actions.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.