CVE-2020-10146 Overview
CVE-2020-10146 is a stored cross-site scripting (XSS) vulnerability affecting the Microsoft Teams online service. The flaw exists in the displayName parameter, which fails to properly sanitize user-supplied input before rendering it in the Teams client interface. This vulnerability can be exploited to obtain sensitive information such as authentication tokens and potentially execute arbitrary commands within the context of a victim's Teams session.
Critical Impact
Attackers can inject malicious scripts that execute in the context of other Teams users, potentially stealing authentication tokens and executing unauthorized commands.
Affected Products
- Microsoft Teams (all versions prior to October 2020 patch)
Discovery Timeline
- 2020-12-09 - CVE-2020-10146 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-10146
Vulnerability Analysis
This stored cross-site scripting vulnerability (CWE-79) occurs in the Microsoft Teams online service where the displayName parameter is not properly sanitized before being rendered in the Teams client. When a user interacts with content containing a malicious display name, the injected script executes within their browser context.
The vulnerability requires low privileges to exploit—an attacker needs only a valid Teams account to inject malicious payloads. User interaction is required for successful exploitation, as the victim must view the malicious content. However, once triggered, the attack can cross security boundaries (scope changed), affecting the confidentiality and integrity of the victim's session.
The impact includes potential theft of authentication tokens, session cookies, and other sensitive data accessible within the Teams client context. In more severe scenarios, the vulnerability could enable execution of arbitrary commands through the compromised session.
Root Cause
The root cause of this vulnerability is improper input validation and output encoding in the Microsoft Teams application. The displayName parameter accepts user-controlled input without adequate sanitization, allowing HTML and JavaScript code to be stored and subsequently rendered in the context of other users' browsers. This is a classic stored XSS pattern where malicious content persists in the application and affects all users who view it.
Attack Vector
The attack is network-based and requires an authenticated attacker to craft a malicious payload within the displayName field. The exploitation flow involves:
- An attacker with a valid Teams account modifies their display name to include malicious JavaScript code
- The malicious payload is stored in the Microsoft Teams service
- When other users interact with content showing the attacker's display name (such as messages, meeting invitations, or contact lists), the script executes
- The malicious script can then exfiltrate authentication tokens, session data, or perform actions on behalf of the victim
A proof-of-concept demonstrating this vulnerability is available in the GitHub PoC Repository. The attack requires user interaction but can be highly effective in environments where Teams is widely used for collaboration.
Detection Methods for CVE-2020-10146
Indicators of Compromise
- Unusual JavaScript or HTML tags appearing in user display names within Teams
- Unexpected outbound network connections from Teams clients to unknown domains
- Authentication token requests or session anomalies following Teams interactions
- User reports of unusual behavior after viewing specific Teams content
Detection Strategies
- Monitor Teams client logs for script execution errors or unusual DOM manipulation
- Implement Content Security Policy (CSP) monitoring to detect policy violations
- Deploy network monitoring to identify exfiltration attempts from Teams clients
- Use browser security extensions that can detect and block XSS attacks
Monitoring Recommendations
- Enable enhanced logging for Microsoft Teams activity within your organization
- Monitor for unusual authentication patterns that may indicate token theft
- Implement SIEM rules to correlate Teams usage with suspicious network activity
- Review Teams audit logs for unexpected profile modifications
How to Mitigate CVE-2020-10146
Immediate Actions Required
- Ensure Microsoft Teams clients are updated to versions released after October 2020
- Review organizational Teams configurations for any suspicious display names
- Educate users about the risks of interacting with suspicious Teams content
- Consider implementing additional browser-level XSS protections
Patch Information
Microsoft addressed this vulnerability in the Microsoft Teams online service on or around October 2020. As a cloud-based service, the fix was deployed automatically to all Teams users. Organizations using the Teams desktop client should ensure they are running updated versions that incorporate the server-side fix. No specific CVE-associated patch version number has been published, as the remediation was performed on the service backend.
Workarounds
- Implement strict Content Security Policy headers where possible for Teams web client access
- Use network-level filtering to block known malicious domains that could be used for token exfiltration
- Restrict Teams usage to trusted networks while ensuring updates are applied
- Enable multi-factor authentication to reduce the impact of potential token theft
For technical details on the vulnerability mechanism and proof-of-concept, refer to the GitHub PoC Repository.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

