Skip to content
Info disclosure Write-up Intermediate

Facebook FBML DOM Traversal (Information Disclosure)

Protected FBML elements marked with fb_protected could be traversed using getElementsByTagName to access their sub-elements, allowing a malicious application to read friends' names and profile pictures or automatically post comments on the user's behalf.

Matt Austin Follow

Published on maustin.net

In a Facebook FBML application some elements are protected with fbprotected=”true”. When transversing the elements with getElementsByTagName sub elements of the protected element can be accessed.

Matt Austin (@mattaustin), on maustin.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 fb_protected attribute only guarded the top-level element, not its descendants, so DOM traversal methods could still reach protected child elements.

Impact

A malicious application could automatically post comments and leak friends' names, profile pictures and user IDs, transparently to the user.

What the attacker needed

Victim uses a malicious FBML application; attacker controls FBML content

How it was found

  1. Create an FBML application that includes a comment box or multi-friend selector.
  2. Load the FBML through the serverfbml.php plugin endpoint in an iframe.
  3. Use JavaScript to get the container element and call getElementsByTagName to find inner form fields or links.
  4. For the comment box, set the textarea value, check the wall post checkbox, and submit the form.
  5. For the friend selector, read the title attribute of each link to obtain friends' full names and the background style for profile pictures and user IDs.

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.

Facebook's FBML let apps build pages with special tags. Some tags were meant to be protected so apps couldn't touch them, but the protection only covered the outer tag, not the parts inside. A bad app could still reach those inner parts and read private data or act as the user.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Matt Austin

View all

5 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.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.