The neglected bug that can infect All Facebook users who pay for leads ads.
A lead-generation form on Facebook accepted arbitrary text that was later exported into a CSV file, so a user could enter a spreadsheet formula that runs commands when the advertiser opens the download. An attacker could therefore run commands or download and run files on the computer of anyone who exported the leads.
Published on medium.com
When you make an ad that asks the Facebook user to put his contact information to call him later, you regularly check the new leads by downloading the excel/CSV file.
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
Impact
A user could run commands and download and run files on the computer of an advertiser who opens the exported leads; the report notes Facebook did not treat it as a security problem.
What the attacker needed
A Facebook lead-generation ad; attacker submits the form; victim downloads and opens the CSV
The fix
The export should be fixed by neutralising formula-leading characters in user-supplied values before they are written to the CSV.
How it was found
- Create or use a lead-generation ad form on Facebook.
- Submit the form with a spreadsheet formula as an answer.
- Download the leads as an Excel or CSV file.
- Open the downloaded file in a spreadsheet program, which runs the formula.
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.
When someone fills in a Facebook lead form, their answers are saved and the advertiser can download them as a spreadsheet file. Spreadsheet programs treat text starting with certain characters as a formula and will run it, so a malicious answer can become a command on the advertiser's machine. This is called CSV injection.