Skip to content
CSRF Write-up Beginner

Messenger site wide CSRF

The Messenger.com site did not validate CSRF tokens on any of its endpoints, so an attacker could make a logged-in user perform actions such as changing settings or removing a user from a group thread. The author confirmed this by removing or altering the token and still getting successful responses.

Jack Follow

Published on whitton.io

When Messenger.com launched back in April, I quickly had a look for any low-hanging fruit.

Jack, on whitton.io

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

The server did not validate the CSRF token (fb_dtsg) on any Messenger.com endpoint, accepting requests even when the token was missing or altered.

Impact

An attacker could perform actions on behalf of a logged-in Messenger user, such as changing settings or removing a user from a group thread, without the user's knowledge.

What the attacker needed

Victim is logged in to Messenger.com; victim visits an attacker-controlled page

The fix

The fix was to properly check the CSRF token on every request.

How it was found

  1. Send a request to change the sound_enabled setting with the normal parameters and note the expected response.
  2. Remove the fb_dtsg CSRF token from the request and send it again.
  3. Observe that the response is the same as the normal request, indicating the token was not checked.
  4. Try another endpoint, such as removing a user from a group thread, without the token.
  5. Observe that this request also succeeds, confirming the missing check.

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.

When you are logged into a website, your browser automatically sends your session cookie with every request to that site. If the site does not also require a secret, unpredictable token in each request, another website can quietly make your browser send a request that changes your account. This is called cross-site request forgery (CSRF). Here, the Messenger site accepted requests without checking that token, so an attacker could change settings or remove people from group chats on behalf of any logged-in user.

What is CSRF?

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

More by Jack

View all

14 more disclosed reports, best first.

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.