Get Gift Card Purchases posts
A Facebook page post type accepted an arbitrary photo_id from any user, so an attacker could attach another user's photo to their own post and then delete the post, which eventually deleted the original photo from Facebook's CDN. This allowed deletion of any public or private image stored on Facebook's CDN, including images in Messenger and Workplace.
bugreader.com
Published on bugreader.com
Today , I'll share with you one of the most critical bugs we've found in Facebook , through this bug we were able to delete any image located in Facebook CDN server as result delete any image shared on Facebook ( public & private photos).
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 gift card post creation endpoint did not verify that the supplied photo_id belonged to the requesting user, and deleting the post cascaded to deleting the referenced photo.
Impact
An attacker could delete any image stored on Facebook's CDN, including private photos across Facebook, Messenger and Workplace, though the deletion only became visible after a delay of roughly 20 to 40 seconds.
What the attacker needed
A Facebook page the attacker administers; knowledge of the victim photo id; ability to intercept the create request
How it was found
- Create a 'Get Gift Card Purchases' post on a page and intercept the creation request.
- Replace the photo_id parameter with the id of a victim's photo.
- Publish the post, which succeeds and references the victim's photo.
- Delete the post.
- Wait 20 to 40 seconds for the deletion to propagate and observe that the victim's photo is gone.
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 stores images on its own servers and refers to each one by a number called a photo id. A page post feature let the author pick which photo to show, but it did not check that the photo belonged to them. By putting someone else's photo id in their own post and then deleting the post, the attacker caused the original photo to be removed too.
What is IDOR?
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.