Skip to content
IDOR Write-up Intermediate

Add or remove the linked publications from Author Publisher settings

The Author Publisher settings allowed an attacker to add or remove linked publications from another user's profile by manipulating the author_id and publisher_id parameters in a GraphQL request. This could let an attacker alter which publications were credited to a victim author.

Rahul Kankrale Follow

Published on servicenger.com

Bounty$863 View original

Facebook Linked Publications ( Authorship or Author Tag ) feature was designed to give journalists more credit and visibility for the articles they were writing, regardless of where they were being published and it resulted in the byline that you saw in many posts, as well as the ability to easily follow that…

Rahul Kankrale, on servicenger.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Facebook's Linked Publications feature, also described as Authorship or Author Tag, was built to give journalists more credit and visibility for the articles they wrote, regardless of where those articles were published. It produced the byline seen on many posts and let readers follow a journalist and see when they shared new articles publicly.

To use the feature, an author had to grant permission to a publication or website, specifically the Facebook page of that site, so that the site could be cited as the author in the byline. The author logged in to their own Facebook profile, opened Settings for that profile and clicked "Linked Publications", or went directly to:

Text
https://www.facebook.com/settings?tab=author_publisher

There the author added or removed the publication's (or site's) Facebook page as a "linked publication". The feature was vulnerable to an Insecure Direct Object Reference (IDOR), which could let an attacker add or remove approved publications from another user's Author Publisher settings.

Setup

The report gives few setup details. The vulnerable parameters were author_id and publisher_id, and the request was a GraphQL request made with a first party access token, specifically the Android first party token. The researcher does not describe how the victim account or the media page were created, nor which tool was used to send the request.

Finding it

The researcher identified that the Author Publisher settings, which control which publications are linked to an author's profile, were driven by two identifiers supplied in a GraphQL request: author_id and publisher_id. The report names author_id and publisher_id as the vulnerable parameters and classifies the bug as an IDOR, without describing the server side check. That mismatch between the identity in the token and the identity in the request is what made the feature look wrong.

Exploitation

The researcher states that the following GraphQL request reproduces the issue, with author_id and publisher_id as the vulnerable parameters and a first party (Android) access token used for authentication. The report does not reproduce the request body itself, only the two parameters and the two operations.

Step 1: Add a publication to the victim's settings

Send the GraphQL request with author_id set to the victim's profile id and publisher_id set to any media or news page id. The report describes this as the add operation, with author_id set to the victim's profile id and publisher_id to any media or news page id.

Step 2: Remove a publication from the victim's settings

The same request, with the same two parameters, can be used to remove a publication from the victim's settings. The report does not show the exact mutation or the response returned by either operation.

Root cause

Impact

An attacker could add or remove approved publications from another user's Author Publisher settings.

Fix

The report records the following timeline:

Date Event
27/05/2021 Report submitted
27/05/2021 Triaged
07/06/2021 Fixed: the add/remove vulnerability was patched, but the researcher could still see previously approved publications of any page
21/07/2021 Bounty of $750 plus $75 Gold league bonus plus $38 delay bonus
28/09/2021 Facebook replied that the product team decided to remove the add and remove functionality for this feature, and that cleanup was still ongoing, since add/remove was no longer available and only previously added settings could be seen
07/12/2021 Feature completely removed and cleanup of the issue completed

In short, the add and remove functionality was first patched, then removed entirely, and the feature was completely removed on 07/12/2021.

Variants to test

  • On other GraphQL APIs, change an author_id style parameter to another user's id while keeping your own token. A positive result is a successful mutation that changes the other user's settings.
  • Swap a publisher_id or similar object id for one you do not own. A positive result is the server accepting the link or unlink without an ownership error.
  • After a fix that blocks writes, retry the read path for the same objects. A positive result is that previously approved publications of any page are still returned, as happened here after the first patch.
  • Test first party mobile tokens against endpoints that also accept web sessions. A positive result is that the mobile token is accepted for operations the web session would refuse.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

What happened, in plain words

Facebook had a feature called Linked Publications, also described as Authorship or Author Tag. It was built so that journalists could get more credit and visibility for the articles they wrote, no matter where those articles were published. The feature produced the byline that appeared on many posts, and it let readers follow a journalist and see when that journalist shared new articles publicly.

To use the feature, an author had to give permission to a publication or a website, and specifically to the Facebook page of that site, so that the site could be cited as the author in the byline. The author logged in to their own Facebook profile, opened Settings for that profile and clicked "Linked Publications", or went straight to this address:

Text
https://www.facebook.com/settings?tab=author_publisher

That address is just a normal web page. The part after the question mark, tab=author_publisher, tells Facebook which settings tab to open. Nothing secret is in it; it is simply a shortcut to the right screen.

On that screen the author added or removed the publication's (or site's) Facebook page as a "linked publication". The feature was vulnerable to an Insecure Direct Object Reference (IDOR), which could let an attacker add or remove approved publications from another user's Author Publisher settings.

An IDOR is a very common kind of bug. Many web applications keep records that are identified by a number or an id, for example a profile, an order or a photo. When the application accepts that id from the browser and acts on it without checking that the id belongs to the person making the request, someone can simply change the number and touch somebody else's record. A useful everyday comparison is a cloakroom ticket: if the attendant hands you whatever coat matches the number on your ticket without checking that the ticket is really yours, you can write a different number on a scrap of paper and walk away with a stranger's coat. The ticket is the id, and the missing check is the vulnerability.

Setup

The report gives few setup details. The vulnerable parameters were author_id and publisher_id, and the request was a GraphQL request made with a first party access token, specifically the Android first party token. The researcher does not describe how the victim account or the media page were created, nor which tool was used to send the request.

Two of those terms deserve a plain explanation before we go further.

GraphQL is a way for a client (a phone app or a web page) to ask a server for exactly the data it needs, and to ask the server to change data, using a single address. Instead of many different URLs for many different actions, GraphQL has one endpoint and the request body describes the operation. Think of it as a restaurant with one waiter: you write your order on a form, and the waiter takes the form to the kitchen. The form is the GraphQL request.

An access token is a long string that the server gives you after you log in, and that your app sends with every request to prove who you are. It works like a wristband at an event: the staff at the door gave it to you after checking your ticket, and inside the venue you show the wristband instead of your ticket every time. A first party token is one issued by the company's own app, here the Android app, as opposed to a token issued to some third party integration. The report says the Android first party token was used, but it does not show the token itself, and it should never be published anyway.

Finding it

The researcher identified that the Author Publisher settings, which control which publications are linked to an author's profile, were driven by two identifiers supplied in a GraphQL request: author_id and publisher_id. The report names author_id and publisher_id as the vulnerable parameters and classifies the bug as an IDOR, without describing the server side check. That mismatch between the identity in the token and the identity in the request is what made the feature look wrong.

In other words, the request carried two pieces of information about who and what: the token said "I am this logged in user", and the body said "change the settings of author_id for publisher_id".

Exploitation

The researcher states that the following GraphQL request reproduces the issue, with author_id and publisher_id as the vulnerable parameters and a first party (Android) access token used for authentication. The report does not reproduce the request body itself, only the two parameters and the two operations.

Step 1: Add a publication to the victim's settings

Send the GraphQL request with author_id set to the victim's profile id and publisher_id set to any media or news page id. The report describes this as the add operation, with author_id set to the victim's profile id and publisher_id to any media or news page id.

Why this step matters: the attacker is not trying to read anything secret. The goal is to make a change in somebody else's account.

Step 2: Remove a publication from the victim's settings

The same request, with the same two parameters, can be used to remove a publication from the victim's settings.

Why this step matters: removal is the mirror image of addition.

Root cause

An ownership check is simply the server asking: does the user identified by this token own the record identified by this id? If the answer is no, the request is refused. That single comparison is what turns a working feature into a safe one.

Impact

An attacker could add or remove approved publications from another user's Author Publisher settings.

Fix

The report records the following timeline:

Date Event
27/05/2021 Report submitted
27/05/2021 Triaged
07/06/2021 Fixed: the add/remove vulnerability was patched, but the researcher could still see previously approved publications of any page
21/07/2021 Bounty of $750 plus $75 Gold league bonus plus $38 delay bonus
28/09/2021 Facebook replied that the product team decided to remove the add and remove functionality for this feature, and that cleanup was still ongoing, since add/remove was no longer available and only previously added settings could be seen
07/12/2021 Feature completely removed and cleanup of the issue completed

In short, the add and remove functionality was first patched, then removed entirely, and the feature was completely removed on 07/12/2021.

"Triaged" means the security team looked at the report and confirmed it was a real issue worth working on. The note on 07/06/2021 is interesting for a beginner: the write path was closed, but the read path still returned other people's previously approved publications. A fix that blocks changes does not automatically block viewing, and both need checking.

Variants to test

These are general ideas for looking for the same class of bug elsewhere. They are not instructions to attack anything; only test systems you are authorised to test.

  • On other GraphQL APIs, change an author_id style parameter to another user's id while keeping your own token. A positive result is a successful mutation that changes the other user's settings.
  • Swap a publisher_id or similar object id for one you do not own. A positive result is the server accepting the link or unlink without an ownership error.
  • After a fix that blocks writes, retry the read path for the same objects. A positive result is that previously approved publications of any page are still returned, as happened here after the first patch.
  • Test first party mobile tokens against endpoints that also accept web sessions. A positive result is that the mobile token is accepted for operations the web session would refuse.

Glossary

  • Access token: a string issued after login that a client sends with requests to prove which user it is acting for.
  • Android first party token: an access token issued by the company's own Android app, rather than to a third party integration.
  • API: a defined way for one piece of software to talk to another, usually over the network.
  • Author Publisher settings: the Facebook settings screen where an author links or unlinks publications to their profile.
  • author_id: the identifier of the author profile whose settings are being changed.
  • Byline: the line on an article or post that names its author.
  • First party: belonging to the company that runs the service, as opposed to an outside developer.
  • GraphQL: a query language and single endpoint through which a client asks a server to read or change data.
  • IDOR (Insecure Direct Object Reference): a bug where the server accepts an object id from the client and acts on it without checking that the client is allowed to access that object.
  • Linked Publications: the Facebook feature that let an author link a publication's Facebook page to their profile so the page could be cited in the byline.
  • Mutation: in GraphQL, an operation that changes data, as opposed to a query that only reads it.
  • Ownership check: a server side test that the user making a request is the owner of the record the request refers to.
  • publisher_id: the identifier of the publication or news page being linked or unlinked.
  • Read path / write path: the code that returns data versus the code that changes data; a fix to one does not necessarily fix the other.
  • Token subject: the identity that the token represents, which the server should compare against ids in the request.
  • Triaged: the state of a report after the security team has reviewed it and confirmed it is valid.
  • Victim: the person whose account or data is affected by the attack.

More by Rahul Kankrale

View all

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

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.