CSV Injection in Camptix
The Camptix plugin attempted to prevent CSV injection by escaping formula characters, but an attacker could bypass this by starting a cell with a semicolon, which acts as a new cell separator in Excel. This allowed injection of a formula that could execute commands when the CSV was opened in Excel 2016.
- Triaged in 5 days
- Fixed in 41 days
- Paid in 29 days
- Disclosed after 42 days
Hello, Ian!
I see you tried to escape "=, -, +, @" in your code (#151516), but let me show simple workaround.
I've made CSV injection by using this string ";=cmd|' /C calc'!A5" without doublequotes.
";" will bypass your trying to set the quote in the beginning of the string.
";" acts as a new cell separator.
Tested in the Excel 2016
Attachments
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
Likely the CSV escaping logic only checked the beginning of the whole field for formula characters, not each cell after a separator like a semicolon.
What the attacker needed
Attacker can supply a crafted value; Value is exported to CSV; CSV is opened in Excel 2016
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.
CSV injection happens when exported data is read as a formula. The developer blocked =, -, +, @, but a semicolon started a new cell and a formula followed.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.