Skip to content
XSS Write-up Intermediate

Content types and XSS Facebook Studio

An AJAX endpoint on Facebook Studio returned JSON with a text/html content type, so HTML/JavaScript in a page description executed when the endpoint was visited directly.

Jack Follow

Published on whitton.io

I’ve found a few bugs on various Facebook satellite/marketing domains (ones which are part of the Facebook brand, but not necessarily hosted/developed by them, and not under the .facebook.com domain). Most of them aren’t that serious.

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

Impact

An attacker could execute script in a victim's browser on Facebook Studio by getting them to visit a crafted URL; the payload was not in the request body, so Chrome's XSS Auditor and IE's XSS Filter did not block it.

What the attacker needed

Victim visits a crafted URL; attacker can set a Facebook page description

The fix

The content type was corrected, and the issue was fixed.

How it was found

  1. Set a Facebook page description to contain HTML/JavaScript.
  2. Use the form that scrapes details from the Facebook page, which calls an AJAX endpoint with the page URL.
  3. Visit the endpoint URL directly in a browser to trigger execution of the script.

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 a website sends data to your browser, it also says what kind of data it is (the content type). If it says 'HTML', the browser will run any scripts inside that data. Here, the site sent JSON data but labelled it as HTML, so script hidden in a Facebook page description ran when someone opened the endpoint directly.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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 scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.