S4E just found a high-severity finding from top 10 tcp port service scan
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
medium·Product Based Web Vulnerabilities·Updated Mar 27, 2025

CVE-2021-37859 Scanner

CVE-2021-37859 Scanner - Cross-Site Scripting (XSS) vulnerability in Mattermost

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
3.2k
Times Used
continuous scan runs
5.1k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
CVECVE-2021-37859
6.1
CVSShigh
Exploitable remotely over the internet · no authentication required · user interaction needed.

Fixed a bypass for a reflected cross-site scripting vulnerability affecting OAuth-enabled instances of Mattermost.

Attack Vector
Network
Privileges Req.
None
User Interaction
Required
Affected
Mattermostby Mattermost
5.34.5
Updated Aug 21, 2026View on NVD →
Detail

Mattermost is a popular open-source messaging platform used for team collaboration, providing solutions for secure communication within organizations. It is widely used in sectors like technology, education, and healthcare to facilitate efficient information sharing and project management. By integrating with various tools and having a customizable interface, Mattermost supports hybrid work environments. The software allows developers to build custom applications and automate workflows. It enhances productivity by offering features like group messaging, file sharing, and threaded discussions. Organizations use Mattermost to ensure team alignment and maintain a secure line of communication.

Cross-Site Scripting (XSS) is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. It targets the dynamic content of web applications by inserting client-side scripts, typically JavaScript, which can execute in the context of users' browsers. In the case of Mattermost, the vulnerability occurs during the OAuth authentication flow when improper input sanitization leads to the execution of unauthorized scripts. Such vulnerabilities are particularly dangerous as they can be exploited to perform actions like session hijacking or phishing without the user’s consent. It's crucial for web applications to ensure strict input validation to prevent XSS attacks.

The vulnerability in Mattermost is specifically located in the OAuth flow where user inputs are not properly sanitized before being reflected in the application's output. The vulnerable endpoint, "/oauth/shielder/mobile_login", allows crafted scripts within the "redirect_to" parameter to be executed. Attackers can exploit this by tricking users into visiting a specially crafted URL that leads to malicious actions being performed within their session. The payload involves an injected image tag with an 'onerror' event which triggers JavaScript code, visible when a specific pattern is detected in the HTTP response. Identifying such vulnerabilities often requires careful inspection of server responses and understanding how user input is handled.

If exploited, the XSS vulnerability can have severe consequences including the unauthorized takeover of user sessions, theft of sensitive data such as cookies, and user credentials. It can also enable attackers to inject deceptive content, leading to potential phishing attacks. Organizations may face reputational damage, data breaches, and unauthorized access to restricted areas. Beyond individual user impact, the spread of malware through injected payloads could become a significant security risk. Therefore, addressing XSS vulnerabilities is critical to maintaining application integrity and user trust.

Solution Advice
  • Implement strict input validation and sanitation to prevent malicious data from being processed.
  • Refactor code to utilize proper content security policies, including escaping and encoding methods.
  • Ensure that OAuth endpoints do not reflect unsanitized user inputs to application outputs.
  • Regularly update and patch the software to mitigate exposure to known vulnerabilities.
  • Educate developers on secure coding practices to prevent introduction of similar vulnerabilities.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2021-37859 Scanner - Cross-Site Scripting (XSS) vulnerability in Mattermost | S4E