Skip to content
RCE Disclosed report Beginner

CSV Injection with the CVS export feature

The CSV export feature did not escape fields, so a researcher could set an issue name starting with a formula. When a response team exported and opened the file in a spreadsheet, the formula was evaluated.

appsec3 Follow

Originally disclosed on HackerOne

  • Triaged in 2 hours
  • Fixed in 11 hours
  • Paid in 2 months
  • Disclosed after 3 months

The "Download as a CSV" feature of HackerOne does not properly "escape" fields. This allows an adversary to turn a field into active content so when a response team download the csv and opens it, the active content gets executed. Here is more information about this issue: http://www.contextis.com/resources/blog/comma-separated-vulnerabilities/

Here is one method to reproduce this issue:

  1. As a researcher, I can report an issue with a name starting with "=1+1"
  2. As a response team, I choose to export all issues found to CSV containing the issue in (1)
  3. As a response team, I now open this CSV file in excel or another spreadsheet program
  4. You can see the cell containing the issue name in (1) is displayed as "2" which means the code is executed.

Mitigation: Ensure all fields are properly "escaped" before returning the CSV file to the user.

The original report as published on HackerOne, by appsec3. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 export wrote user-controlled fields without escaping or prefixing them, so spreadsheet software interpreted them as formulas.

Impact

An attacker could make a response team's spreadsheet evaluate attacker-supplied formulas when the exported file is opened.

What the attacker needed

Ability to create an issue; victim exports issues to CSV; victim opens the file in a spreadsheet

The fix

All fields should be properly escaped before the CSV file is returned to the user.

How it was found

  1. Create an issue whose name starts with a formula.
  2. Export all issues to CSV.
  3. Open the CSV in a spreadsheet program.
  4. Observe the cell showing the calculated result.

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 spreadsheet treats any cell starting with an equals sign as a formula and calculates it. Because the export did not neutralise such values, a malicious issue name became a live formula when opened. 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.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.