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.
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.
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
- Set up a Teams meeting and join as organizer.
- Join as a guest with a malicious name containing a tab and formula.
- Organizer leaves the call to trigger report generation.
- 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.