CSV Injection at Camptix Event Ticketing
The Camptix ticketing plugin did not neutralise spreadsheet formula characters in attendee fields such as first and last name. An attacker could submit a value beginning with an equals sign so that, when an administrator exported attendees to CSV and opened it in a spreadsheet application, the formula would be evaluated.
- Triaged in 3 hours
- Fixed in 26 days
- Paid in 3 hours
- Disclosed after 34 days
Hi, As you mentioned the scope of vulnerability as
Any plugin listed on my WordPress.org profile. I am reporting this issue.
I have seen from your WordPress.org profile the second plugin listed is Camptix Event Ticketing
So I looked at the source code of the plugin (https://github.com/Automattic/camptix)
Although I don't have much knowledge about wordpress plugin development what I understood that you have good filtering for XSS (html tags) when submitting user data (in ticket form)
But no filtering to filter out CSV macros (starts with =)
So I installed it in my WP and checked out it with a very simple ticketing with only Firstname ,Lastname and Email
Reproduction of Bug
- From any open to buy ticket sign up for one.
- In the First name , Last name field type
=AND(2>1)and=7*7respectively. - Save them.
- Now from admin panel export the attendees information as CSV. Open the CSV with any application (eg. Excel) and you'll see the First name and Last name field executes the command.
This can be further used to perform command execution on Windows system (high risk) See this Since the bug could be exploited by random user and the victim is admin, I think it should be patched.
The Fix could be simple. Just escape = and - + signs from user input. this will solve the issue I guess.
Hope you resolve and reward.
Zawad
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 plugin escaped HTML for XSS protection but did not neutralise leading formula characters such as equals, plus and minus in user-supplied fields before writing them to the CSV export.
Impact
A random user could plant a formula that executes when an administrator opens the exported CSV, which the reporter says could be used for command execution on Windows systems.
What the attacker needed
Plugin installed on WordPress; attacker can buy or register a ticket; admin exports and opens the CSV
The fix
The reporter suggested escaping equals, minus and plus signs in user input, though the text does not say whether this was applied.
How it was found
- Sign up for any ticket that is open for purchase.
- Enter a formula-like value beginning with an equals sign in the first name and last name fields.
- Save the attendee details.
- Export the attendee information as CSV from the admin panel.
- Open the CSV in a spreadsheet application and observe the fields being evaluated.
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 list of values separated by commas, often opened in a spreadsheet program. Spreadsheet programs treat any cell starting with an equals sign as a formula and run it, so if a website lets a user type such a value and later puts it into a CSV, the person who opens that file may run the attacker's formula. This is called CSV injection.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.