Skip to content
RCE Disclosed report Beginner

CSV Injection with the CVS export feature - Glossary

The CSV export did not escape fields, allowing spreadsheet formulas to be injected via glossary terms; opening the CSV could evaluate them.

amsda Follow

Originally disclosed on HackerOne

  • Fixed in under an hour
  • Disclosed after 20 days

Hi,

The "Download as a CSV" feature of Weblate does not properly "escape" fields. 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. I can add new information in Glossary with a name starting with "=1+1;" or "-2+3+cmd|' /C calc'!G2;"
  2. I choose to export all Glossary to CSV containing the issue in (1)
  3. 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" (=1+1;) which means the code is executed.

Attachments

Record_2017_04_27_08_14_47_181.mp4 From the original on HackerOne

The original report as published on HackerOne, by amsda. 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 application failed to sanitise or escape user-controlled fields when generating CSV output, allowing formula injection.

Impact

An attacker could cause spreadsheet formulas to be evaluated when a victim opens the exported CSV.

What the attacker needed

Ability to add glossary entries; victim opens exported CSV in spreadsheet

How it was found

  1. Add a new glossary entry with a name that starts with a spreadsheet formula.
  2. Export all glossary entries to CSV.
  3. Open the exported CSV file in a spreadsheet program.
  4. Observe that the cell displays the result of the formula, indicating execution.

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.

When you export data to a CSV file, spreadsheet programs like Excel treat certain characters at the start of a cell as formulas. If an attacker can put such a formula into a field that gets exported, opening the file can run that formula on your computer. 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 by amsda

View all

5 more disclosed reports, best first.

More from Weblate

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.