Skip to content
Access control Write-up Beginner

Tagged User Could Delete Facebook Story

A user tagged in a Facebook story could delete that story by attempting to remove their tag, which triggered an error and deleted the story instead of just removing the tag. This allowed a non-owner to delete another user's content.

Mark Rhoy Follow

Published on mrkrhy-xyz.medium.com

I recently reached BronzeHacker PlusLeague on the Facebook bug bounty program. So today, I will be sharing one of my recently resolved reports.

Mark Rhoy, on mrkrhy-xyz.medium.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. 4 min read.

Context

Facebook Stories let a user post a photo or video that disappears after a period of time. When someone posts a story, they can tag another user in it. The tagged user receives a message telling them they were tagged, and the story's options include a "Remove Tag" button so the tagged user can detach themselves from the story without affecting the post itself.

Deleting a story is meant to be reserved for its owner. If a story breaks the Facebook Terms of Service, the correct route is to report it and let Facebook handle it. A tagged user should only ever be able to remove their own tag.

The report describes a logic flaw in the Facebook Android app, version 331.1.0.29.117, where removing a tag had the side effect of deleting the whole story. The author notes that most of the security bugs they found on the Facebook platform were simple, and that they did not use proxy tools to find them.

From the original on mrkrhy-xyz.medium.com

Setup

Two real accounts are needed: Alice, who posts the story, and her friend Bob, who is tagged in it. The author mentions Facebook's whitehat test account facility (FBDL) as an option, but states that the issue could not be reproduced using test accounts for an unknown reason, so real accounts were used.

No proxy or interception tooling is described. The reproduction is carried out entirely through the normal app interface.

Finding it

In the Android app, when a tagged user clicked "Remove Tag", an error appeared and the story was deleted instead of only the tag being removed. Since only the story owner is supposed to be able to delete a story, a tagged user being able to take the story down simply by untagging themselves is a broken authorisation problem, not just a UI glitch.

Exploitation

Step 1: Alice creates a story

Alice creates a story.

Step 2: Alice tags Bob

Alice tags Bob in the story.

Step 3: Alice shares the story

Alice shares the story.

Step 4: Bob is notified

Bob receives a message that he was tagged in Alice's story.

Step 5: Bob decides to remove the tag

Bob wants to remove the tag.

Step 6: Bob clicks "Remove Tag"

Bob presses the "Remove Tag" button in the story options.

Step 7: An error is shown

Bob receives an error message on the action.

Step 8: The story is deleted

Alice's story got deleted.

Root cause

The report does not include any code, request or response, so the exact defect is not shown. The report does not explain the cause; it only shows that the untag action deleted the story.

Impact

A user tagged in someone else's story could delete that story by attempting to remove their own tag. The action is available to any tagged user, so the precondition is simply being tagged in a story. The effect is the loss of the owner's post, which the owner did not authorise and which the tagged user is not entitled to perform. The report does not describe any wider access, data exposure or effect on other accounts.

Fix

Facebook fixed the issue on 15 September 2021, after the report was triaged on 23 August 2021 and before the bounty was awarded on 22 September 2021. The correct behaviour, as stated in Facebook's bounty response, is that only the owner of a story should be able to delete it, and removing a tag on a story should not trigger deletion.

Variants to test

  1. Untag flows on other content types: attempt to remove a tag from a post, photo or reel as the tagged user and check whether the content itself is affected. A positive result is the content disappearing or becoming unavailable to its owner after the untag action.
  2. Error paths on destructive actions: trigger an action that returns an error to the client and then check whether the underlying object changed. A positive result is state changing despite the error response.
  3. Ownership checks on delete endpoints: replay a delete request for an object you do not own, including from a tagged or mentioned account. A positive result is the object being removed for a non-owner.
  4. Client-side action mapping: compare the request sent by "Remove Tag" with the request sent by "Delete" in the same app version. A positive result is the untag action reaching the same endpoint or parameter as deletion.
  5. Test accounts versus real accounts: repeat the flow with test accounts where the platform provides them, and note any difference in behaviour, since the author could not reproduce the issue with test accounts.

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 Stories are short-lived posts: a photo or video that disappears after a while. When you post a story, you can tag a friend in it. The friend gets a message saying they were tagged, and the story's options include a "Remove Tag" button so the friend can take their name off the story without touching the post itself.

Deleting a story is supposed to be something only the person who posted it can do. If a story breaks Facebook's rules, the right move is to report it and let Facebook deal with it. A tagged friend should only ever be able to remove their own tag.

This report describes a logic flaw in the Facebook Android app, version 331.1.0.29.117. When a tagged user pressed "Remove Tag", the app showed an error, and instead of just removing the tag it deleted the whole story. The author notes that most of the security bugs they found on Facebook were simple, and that they did not use proxy tools to find them.

From the original on mrkrhy-xyz.medium.com

A few ideas before we go further, because they come up again and again:

  • Logic flaw: a bug where the app does exactly what its code says, but the code's rules are wrong. Nothing crashes and no memory is corrupted; the app simply allows something it should not. Think of a form that asks for your age and accepts "-5": the form works, the rule is broken.
  • Broken authorisation: the app fails to check whether you are allowed to do something. A useful comparison is a hotel: authentication is showing your key card at the door, authorisation is the door only opening the rooms you booked. Here, the app let the wrong person perform an action reserved for the story's owner.
  • Proxy tool: software that sits between your phone or browser and the internet, letting you read and change the traffic going back and forth. Security testers often use one to see the hidden requests an app makes. This report did not need one.

Setup

You need two real accounts: Alice, who posts the story, and her friend Bob, who gets tagged in it. The author mentions Facebook's whitehat test account facility (FBDL) as an option, but says the issue could not be reproduced with test accounts for an unknown reason, so real accounts were used.

No proxy or interception tooling is described anywhere. The whole reproduction happens through the normal app interface, the same buttons any user would press.

Finding it

The behaviour was noticed in the Android app. When a tagged user chose to remove their tag, the app produced an error on the "Remove Tag" action and, instead of only removing the tag, deleted the story. Since only the story owner is supposed to be able to delete a story, a tagged user being able to take the story down simply by untagging themselves is a broken authorisation problem, not just a cosmetic glitch.

Exploitation

Step 1: Alice creates a story

Alice posts a story from her account in the Android app. This is the ordinary starting point: there is now a piece of content that belongs to Alice.

Step 2: Alice tags Bob

Alice tags Bob in the story. Alice tags Bob in the story.

Step 3: Alice shares the story

Alice shares the story.

Step 4: Bob is notified

Bob receives a message that he was tagged in Alice's story.

Step 5: Bob decides to remove the tag

Bob opens the story options with the intention of detaching himself from the post. Bob wants to remove the tag.

Step 6: Bob clicks "Remove Tag"

Bob presses the "Remove Tag" button in the story options. Bob clicks the "Remove Tag" button from the story option.

Step 7: An error is shown

Bob receives an error message on the action. Bob receives an error message.

Step 8: The story is deleted

Alice's story got deleted.

Root cause

The report does not include any code, request or response, so the exact defect is not shown. The report does not explain the cause; it only shows that the untag action deleted the story.

Impact

A user tagged in someone else's story could delete that story by attempting to remove their own tag. The action is available to any tagged user, so the precondition is simply being tagged in a story. The effect is the loss of the owner's post, which the owner did not authorise and which the tagged user is not entitled to perform. The report does not describe any wider access, data exposure or effect on other accounts.

Fix

Facebook fixed the issue on 15 September 2021, after the report was triaged on 23 August 2021 and before the bounty was awarded on 22 September 2021. The correct behaviour, as stated in Facebook's bounty response, is that only the owner of a story should be able to delete it, and removing a tag on a story should not trigger deletion.

Variants to test

These are follow-up checks in the same spirit, for anyone who wants to look for similar mistakes elsewhere:

  1. Untag flows on other content types: attempt to remove a tag from a post, photo or reel as the tagged user and check whether the content itself is affected. A positive result is the content disappearing or becoming unavailable to its owner after the untag action.
  2. Error paths on destructive actions: trigger an action that returns an error to the client and then check whether the underlying object changed. A positive result is state changing despite the error response.
  3. Ownership checks on delete endpoints: replay a delete request for an object you do not own, including from a tagged or mentioned account. A positive result is the object being removed for a non-owner.
  4. Client-side action mapping: compare the request sent by "Remove Tag" with the request sent by "Delete" in the same app version. A positive result is the untag action reaching the same endpoint or parameter as deletion.
  5. Test accounts versus real accounts: repeat the flow with test accounts where the platform provides them, and note any difference in behaviour, since the author could not reproduce the issue with test accounts.

Glossary

  • Logic flaw: a bug where the app follows its own rules but the rules themselves are wrong, allowing something that should not be allowed.
  • Broken authorisation: a failure to check whether a user is permitted to perform an action, so the wrong person can do it.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: deciding what a proven user is allowed to do.
  • Story: a Facebook post (photo or video) that disappears after a period of time.
  • Tag: a link between a post and another person's account, showing that the person appears in or is associated with the post.
  • Untag / Remove Tag: the action by which a tagged person detaches their name from a post without affecting the post itself.
  • Owner: the account that created a post, and the only one meant to be able to delete it.
  • Android app: the Facebook application running on Android phones.
  • Version 331.1.0.29.117: the specific build of the Android app in which the behaviour was observed.
  • Proxy tool: software placed between a device and the internet that can read and modify the traffic in between.
  • FBDL: Facebook's whitehat test account facility, offered to security researchers.
  • Test account: a special account provided for testing rather than for real use.
  • Client: the app or browser on the user's side, as opposed to the server.
  • Backend / server: the computers that store data and process requests on Facebook's side.
  • Endpoint: a specific address on a server that an app sends a request to.
  • Request / response: a message an app sends to a server, and the message the server sends back.
  • Error message: feedback shown to the user when an action does not complete as expected.
  • Root cause: the underlying defect that produces the visible behaviour.
  • Impact: the practical harm a bug can cause.
  • Triaged: reviewed by the vendor's security team and accepted as a valid issue.
  • Bounty: a payment made by a company to a researcher who reports a valid security issue.
  • Terms of Service (TOS): the rules a platform sets for what users may post and do.
  • Reel: a short video post on Facebook.
  • State: the stored condition of an object, such as whether a story exists or has been deleted.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.