CSV injection in gitlab.com via issues export feature.
GitLab's issue export to CSV did not neutralise spreadsheet formula characters in issue titles, so a crafted title could run a command when the file was opened in a spreadsheet on Windows. An attacker could execute code on a victim's machine or exfiltrate data.
Originally disclosed on HackerOne
- Triaged in 3 days
- Fixed in 4 months
- Disclosed after 4 months
Dear GitLab bug bounty team,
Summary
GitLab allows users to export issues as a .csv file. By injecting a payload into an issue title an attacker could exfiltrate data or execute code on the target machine. For instance, by naming an issue =cmd|' /C calc'!A0 I am able to open up calc.exe on Windows.
Steps to reproduce
- Create an issue with
=cmd|' /C calc'!A0as the title; - Export all issues (The file is sent as an email attachment);
- Open the .csv file on a Windows machine.
Result: calc.exe pops up.
Fix
Prefix =, +, - and @ symbols with a ' in issues when exporting them to a .csv file.
If you require any further information, feel free to contact me.
Best regards, Ed
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The export wrote user-controlled issue titles into CSV cells without escaping leading formula characters, so spreadsheet software interpreted them as formulas.
Impact
Opening the exported file on Windows could execute a command on the victim's machine, and the report also claims data exfiltration is possible.
What the attacker needed
Ability to create an issue; victim exports issues to CSV; victim opens the file in a spreadsheet on Windows
How it was found
- Create an issue whose title begins with a spreadsheet formula.
- Export all issues; the file is delivered as an email attachment.
- Open the exported CSV on a Windows machine.
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 report has not been written yet. The Original tab links to the source.
A CSV file is a plain-text table that spreadsheet programs open. Some spreadsheets treat a cell starting with =, +, - or @ as a formula and run it. Because GitLab copied issue titles into the file without escaping those characters, a malicious title became a live formula on the victim's computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.