Skip to content
Write-up Beginner

Microsoft Azure Portal – CSV Injection

The Azure Portal did not properly escape user-supplied values in CSV exports, allowing formula injection. An attacker could insert a formula into a user field, and when another user downloads and opens the CSV in a spreadsheet application, the formula could execute or alter data.

Christian Becker Follow

Published on y-security.de

Various Azure Active Directory components can be used to export displayed data in CSV format. A few components were identified in which the generated CSV values were found to be properly escaped.

christian, on y-security.de

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 quote user-controlled values that begin with formula-triggering characters before including them in CSV exports.

Impact

An attacker could insert formulas that execute when another user opens the CSV in a spreadsheet application, potentially leading to command execution or data exfiltration; the vulnerability remains unfixed.

What the attacker needed

Azure AD account (admin or non-admin); Victim downloads and opens CSV in spreadsheet

The fix

The vulnerability should be fixed by escaping or quoting formula-triggering characters in CSV exports, and Microsoft is working on a defence-in-depth mitigation.

How it was found

  1. Log in to the Azure AD portal and open the Users blade.
  2. Create a new user and set a name field to a formula such as =3+1.
  3. Start a bulk download of users.
  4. Wait for the export to complete and download the generated CSV file.

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.

When you export data to a CSV file, spreadsheet programs like Excel treat any cell starting with '=' as a formula. If the website does not escape such characters, an attacker can put a formula into a field (like a display name), and when someone else downloads the file and opens it, the formula runs. This can lead to data theft or malicious commands.

More by Christian Becker

View all

1 more disclosed report, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.