Skip to content
RCE Disclosed report Intermediate

Bypass fix in https://hackerone.com/reports/151516 report.

The fix for a CSV injection vulnerability could be bypassed by using a semicolon before the formula, allowing an attacker to inject a malicious formula into exported CSV files. When opened in Excel, this could execute a command such as launching the calculator.

0x01alka Follow

Originally disclosed on HackerOne

Bounty$100 Low View original
  • Triaged in 8 days
  • Fixed in 54 days
  • Paid in 8 days
  • Disclosed after 54 days

Hi.

Steps to reproduce:

  1. The same in previous https://hackerone.com/reports/151516 report.
  2. But payload to bypass your fix would be like this: ;=cmd|' /C calc'!A0

Solution:

  1. Add ; in your escape function esc_csv() on line 2858 of camptix.php

References:

  1. https://www.owasp.org/index.php/CSV_Excel_Macro_Injection

Tested on Windows 7 64 + Microsoft Office Exel 2003(think will work and on later versions)

Regards.

Attachments

1.jpg
1.jpg From the original on HackerOne
2.jpg
2.jpg

The original report as published on HackerOne, by 0x01alka. 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 escape function only checked for formula characters at the start of a cell, so prefixing with a semicolon bypassed the check.

Impact

An attacker could inject a formula that runs a command such as launching the calculator when the exported CSV is opened in Excel.

What the attacker needed

Victim opens exported CSV in Excel; attacker can inject data into exported fields

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 a program exports data to a spreadsheet file and a malicious user can put a formula in a field. If the spreadsheet program treats that field as a formula, it may run commands or steal data. Here, the original fix missed a way to still trigger the formula by adding a semicolon first.

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 0x01alka

View all

1 more disclosed report, best first.

More from Ian Dunn

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.