Skip to content
Write-up Intermediate

Microsoft Teams – CSV Injection

Microsoft Teams did not properly escape user-controlled names when generating attendance report CSV files, allowing formula injection. An attacker could execute commands or exfiltrate data when the file is opened in spreadsheet software.

Christian Becker Follow

Published on y-security.de

With specially crafted usernames it is possible to insert malicious content into a generated attendance report. This can be used to execute arbitrary operating system commands or exfiltrate content from the file system if opened in processor like Microsoft Excel or LibreOffice Calc.

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 CSV export did not neutralise formula-triggering characters (including tab) in user-supplied fields.

Impact

An attacker could execute operating system commands or exfiltrate file contents, but only if the victim opens the CSV in a spreadsheet program and depending on its configuration.

What the attacker needed

Guest access to a Teams meeting; organizer downloads and opens CSV; spreadsheet software allows formulas

The fix

The vulnerability should be fixed by escaping formula-triggering characters and surrounding fields with double quotes.

How it was found

  1. Set up a Teams meeting and join as organizer.
  2. Join as a guest with a malicious name containing a tab and formula.
  3. Organizer leaves the call to trigger report generation.
  4. Download and open the CSV in Excel or LibreOffice Calc.

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 a meeting ends, Teams creates a spreadsheet of who attended. If someone sets their name to something starting with a tab and then a formula, the spreadsheet program may treat it as a command. Opening the file could then run code or send data to an attacker.

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.