Skip to content
Write-up Beginner

[Tips & Tricks] Exfiltrating User's Data Through CSV Injection

The application embedded untrusted user input into CSV files without sanitising formula characters. An attacker could inject spreadsheet formulas that, when the file was opened and a link clicked, exfiltrated the victim's local machine information to an attacker-controlled server.

RE:HACK Follow

Published on blog.rehack.xyz

We were recently contacted by one of our customers who asked us to demonstrate further impacts of this vulnerability. It is widely known that this issue is generally classified as Low to Medium risk due to the level of protection provided by Microsoft Excel (and other spreadsheet software) as well as the requirement…

RE:HACK (@rehackxyz), on blog.rehack.xyz

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application failed to escape or prefix formula-triggering characters (such as '=') when generating CSV files from user input.

Impact

An attacker could exfiltrate the victim's local machine information (such as operating system and directory) to a controlled server, but the attack required the victim to open the CSV file and click an embedded link.

What the attacker needed

Victim opens the CSV file in a spreadsheet program; victim clicks the embedded link

How it was found

  1. Identify a feature that accepts user input and exports it to a CSV file.
  2. Inject spreadsheet formulas into the input fields.
  3. Download the generated CSV file and open it in a spreadsheet program.
  4. The formulas execute and display local machine information.
  5. Click the hyperlink to send the collected information to the attacker's server.

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 write-up has not been written yet. The Original tab links to the source.

CSV injection happens when a website puts user-supplied text into a spreadsheet file without checking it. If that text starts with a special character like '=', the spreadsheet program treats it as a formula and runs it. Here, the formula could collect details about the victim's computer and send them to the attacker when the victim clicked a link.

More by RE:HACK

View all

2 more disclosed reports, best first.

Similar reports

Same bug class and techniques, clearest first.