Skip to content
CSRF Write-up Beginner

CSRF in partners.facebook.com

The onboarding endpoints on partners.facebook.com did not check the anti-CSRF token on the server side, so a request without it was still accepted. An attacker could make a logged-in victim submit or change a site listing, including its banner image, without the victim's knowledge.

Prashanth Varma Follow

Published on github.com

Bounty$5,000 View original

History

Prashanth Varma (@cymtrick), on github.com

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 server accepted the onboarding submissions without validating the fb_dtsg anti-CSRF token, so removing it still returned a success response.

Impact

An attacker could submit or modify a partner site listing and its banner on behalf of a logged-in user, which could affect site owners and their reputation.

What the attacker needed

Victim is logged in to Facebook; victim visits an attacker page; attacker knows the target submission id

The fix

The bug was fixed; the server now returns a 400 error when the CSRF token is missing.

How it was found

  1. Open the onboarding page reached from internet.org and capture the site submission request.
  2. Remove the fb_dtsg token from the request body and resend it.
  3. Observe that the server still returns a success response and a redirect to the submission.
  4. Repeat the same token removal on the banner image upload endpoint.

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.

A CSRF token is a secret value a site puts in each form so the server can tell a real submission from one forged by another website. Here the server ignored that token, so a page on another site could quietly send the same request using the victim's logged-in session. The result is that the victim's site listing could be created or altered without them agreeing.

What is CSRF?

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

More by Prashanth Varma

View all

1 more disclosed report, 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.