Skip to content
SSRF Write-up Intermediate

From CSV Injection to Client-Side SSRF: A Real Bug Bounty Story

User-supplied input in a CSV export feature was written without neutralisation, so fields starting with formula characters were evaluated by Excel. When an admin opened the exported file, formulas could make Excel send requests to internal hosts and exfiltrate responses to an attacker domain.

medium.com

Published on medium.com

In bug bounty programs, issues that initially look low-severity often turn out to have much bigger implications. One such case is CSV/Excel Formula Injection (CWE-1236).

Huseyin, on medium.com

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

The export feature wrote user-controlled values into CSV cells without escaping formula-leading characters, so Excel interpreted them as formulas.

Impact

An attacker could perform client-side SSRF from the admin workstation, probe internal ports, and exfiltrate data from internal HTTP services including AWS instance metadata, with the risk repeating on every export until sanitised.

What the attacker needed

A low-privileged account; admin exports and opens the CSV in Excel

The fix

Values should be escaped or prefixed before being written to CSV, or exported in a format where cells are explicitly typed as text.

How it was found

  1. A low-privileged user injects a formula into a user field that is included in the CSV export.
  2. An admin exports the users list to CSV.
  3. The admin opens the CSV in Microsoft Excel.
  4. Excel evaluates the formula and issues outbound HTTP requests, which the attacker observes on their domain.

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.

A spreadsheet program like Excel treats any cell beginning with an equals sign as a formula and runs it. If a website lets you put text into a CSV file that an admin later opens, you can sneak in a formula that makes the admin's computer fetch web addresses. Here that let the attacker probe internal machines and send back their replies.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.