Injection
CSV Injection
CSV injection (formula injection) embeds spreadsheet formulas in exported data that execute when a victim opens the file in a spreadsheet application.
- 147 payloads
- 1 file
- README on GitHub
Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.
These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.
Payload files
Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.
csv-injection-payloads.txt
147 payloads · 8.6 KBLoading payloads for CSV Injection…
What it is#
CSV Injection (also known as Formula Injection) occurs when an attacker injects spreadsheet formula syntax into fields that are later exported to a CSV or spreadsheet file. When a victim opens the file in Microsoft Excel, LibreOffice Calc, or Google Sheets, the formula executes with the victim's privileges, potentially executing commands, exfiltrating data, or loading remote content.
Attack vectors#
- User profile fields exported to CSV
- Contact forms where data is exported by admins
- Feedback and survey forms
- Product reviews and comments exported as reports
- Log viewers that offer CSV download
Testing methodology#
- Submit =1+1 in a field and export the data to CSV
- Open the exported file in a spreadsheet application and verify formula execution
- Test with =HYPERLINK() to load remote content
- Test with =cmd| to attempt DDE command execution (Excel on Windows)
Indicators of vulnerability#
- Formula evaluated in spreadsheet application when file is opened
- Outbound network request from victim machine to attacker URL
- Calculator or other application launched via DDE
Detection guidance#
Monitor exported files for cells containing formula prefixes (=, +, -, @). Implement server-side sanitization of export data.
Mitigation and remediation#
- Sanitize cell content by prepending a single quote before formula characters
- Encode or strip leading =, +, -, @, TAB, CR characters in export functions
- Use a dedicated library that handles CSV escaping for export
- Inform users of the risk when downloading CSV files from user-generated content
References#
Responsible Use
All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.
- Systems and applications you own
- Authorized penetration testing engagements
- Bug bounty programs with defined scope
- Educational lab environments (DVWA, WebGoat, HackTheBox)