Skip to content
CSRF Write-up Beginner

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.

Mazin Ahmed, on blog.mazinahmed.net

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

  1. Create a malicious HTML page with a form that auto-submits to the send_messages endpoint.
  2. Set the form fields to specify the sender, recipient, and message body.
  3. Trick a logged-in Messenger user into visiting the page, causing the message to be sent.
  4. For deletion, create a similar form targeting the delete_thread endpoint with the victim's thread ID.
  5. 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.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.