How I could have deleted entries for any Facebook Forms
An IDOR in Facebook's lead stage management allowed an attacker to view other pages' stage IDs and delete any stage, including non-empty ones, thereby deleting the leads within. The attacker could delete leads from any Facebook page that used custom stages.
Published on medium.com
This vulnerability is about a IDOR ( Insecure Direct object Reference) which has lead to removal of leads of any Facebook page if the admin puts his leads in a custom stage.
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 server did not verify that the authenticated user owned the stage ID before allowing deletion, and the settings query exposed stage IDs of other pages.
Impact
An attacker could delete any Facebook page's custom lead stage and all leads contained in it, causing data loss for page admins.
What the attacker needed
Facebook account with page admin access; Knowledge of target page ID; Target page uses custom lead stages
The fix
The issue was fixed by Facebook.
How it was found
- Access the leads center settings section to retrieve stage IDs for a page.
- Change the pageID variable in the LeadsManagerSettingsStageManagementSectionQuery to another page's ID to obtain that page's stage IDs.
- Create an empty stage on your own page and capture the delete request to LeadOpportunityRemoveLeadStageMutation.
- Replace the stage_id variable with another page's stage ID and send the request.
- Observe that the other page's stage and its leads are deleted.
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.
An IDOR (Insecure Direct Object Reference) is when a website uses an identifier like a number or code to refer to a user's data, but doesn't check that the person making the request actually owns that data. Here, the stage ID was used without checking ownership, so one page admin could delete another page's lead stage and all its leads.
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.