Skip to main content

CVE-2022-35251: Cross-site Scripting (XSS) - Stored (CWE-79) in Rocket.chat

Medium
VulnerabilityCVE-2022-35251cvecve-2022-35251cwe-79
Published: Fri Sep 23 2022 (09/23/2022, 18:28:12 UTC)
Source: CVE
Vendor/Project: n/a
Product: Rocket.chat

Description

A cross-site scripting vulnerability exists in Rocket.chat <v5 due to style injection in the complete chat window, an adversary is able to manipulate not only the style of it, but will also be able to block functionality as well as hijacking the content of targeted users. Hence the payloads are stored in messages, it is a persistent attack vector, which will trigger as soon as the message gets viewed.

AI-Powered Analysis

AILast updated: 07/08/2025, 06:24:42 UTC

Technical Analysis

CVE-2022-35251 is a stored cross-site scripting (XSS) vulnerability identified in Rocket.chat versions prior to 5.0. The vulnerability arises from improper sanitization of user input in chat messages, allowing an attacker to inject malicious style code into the complete chat window. This style injection enables an adversary to manipulate the visual appearance of the chat interface, block or disable functionality, and hijack the content displayed to targeted users. Because the malicious payloads are stored persistently within chat messages, the attack vector is persistent and triggers automatically whenever the infected message is viewed by a user. The vulnerability requires the attacker to have at least limited privileges (PR:L) and user interaction (UI:R) to trigger, but can affect the confidentiality and integrity of user data by altering displayed content and potentially misleading users. The CVSS 3.1 base score is 5.4 (medium severity), reflecting network attack vector with low attack complexity but requiring privileges and user interaction. No known exploits in the wild have been reported to date. The vulnerability was publicly disclosed on September 23, 2022, and fixed in Rocket.chat version 5.0 and later.

Potential Impact

For European organizations using Rocket.chat versions prior to 5.0, this vulnerability poses a risk to the confidentiality and integrity of communications. Attackers could manipulate chat content to mislead users, potentially facilitating social engineering, phishing, or spreading misinformation within internal or external communications. The ability to block functionality could disrupt collaboration workflows, impacting productivity. While availability is not directly affected, the trustworthiness of the communication platform could be undermined. Given that Rocket.chat is often used by enterprises, public sector entities, and educational institutions across Europe, exploitation could lead to data leakage or unauthorized information disclosure. The requirement for some privileges and user interaction limits the ease of exploitation but does not eliminate risk, especially in environments with many users and potential insider threats. Persistent XSS also increases risk as malicious payloads remain active until removed, potentially affecting multiple users over time.

Mitigation Recommendations

European organizations should prioritize upgrading Rocket.chat to version 5.0 or later where this vulnerability is fixed. Until upgrade is possible, organizations should implement strict input validation and sanitization on chat messages, possibly through custom middleware or web application firewalls (WAFs) that can detect and block suspicious style injection payloads. User privileges should be tightly controlled to limit who can send messages with rich content or styles. Security awareness training should emphasize caution when interacting with unexpected or suspicious messages, especially those containing unusual formatting or styles. Monitoring chat logs for anomalous messages and patterns indicative of XSS payloads can help detect exploitation attempts. Additionally, organizations should consider isolating Rocket.chat instances and restricting network access to trusted users to reduce exposure. Regular security assessments and penetration testing focused on chat platforms can help identify residual risks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
hackerone
Date Reserved
2022-07-06T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682f725b0acd01a2492647dd

Added to database: 5/22/2025, 6:52:11 PM

Last enriched: 7/8/2025, 6:24:42 AM

Last updated: 7/25/2025, 4:07:02 PM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats