CVE-2026-137943 in Roundcube
Summary
by MITRE • 11/27/2026
Roundcube Webmail before 1.6.19 and 1.7.x before 1.7.4 contains a cross-site scripting vulnerability in compose_part_body() in program/actions/mail/compose.php, which converts a text/enriched message part to HTML for the HTML editor without sanitizing the result. Attackers can send a crafted email with a text/enriched part so that script injected into the HTML editor runs in the victim's session when the victim replies to, forwards, or edits the message.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/27/2026
The vulnerability identified in Roundcube Webmail versions prior to 1.6.19 and 1.7.x before 1.7.4 represents a significant security flaw within the application's email composition workflow. Specifically, this issue resides in the compose_part_body function located in program/actions/mail/compose.php. The core technical deficiency is an improper neutralization of special elements for user input, commonly classified under CWE-79: Improper Neutralization of Input During Web Page Generation Cross-site Scripting. When a user interacts with an email message that contains a text/enriched part, the application attempts to convert this content into HTML format to facilitate editing within its rich-text editor. However, during this conversion process, Roundcube fails to adequately sanitize or escape potentially malicious script tags and other executable code embedded in the enriched content. This lack of input validation allows an attacker to inject arbitrary JavaScript code directly into the DOM structure that is rendered by the victim's browser session.
The operational impact of this vulnerability is substantial because it enables a stored cross-site scripting attack vector that triggers upon routine user actions. An adversary can craft and send an email containing a specially constructed text/enriched message part designed to exploit this parsing flaw. When a legitimate user opens, replies to, forwards, or edits such a message within the Roundcube interface, the unsanitized malicious script is executed in the context of the victim's active session. This execution occurs without any additional interaction required from the victim beyond standard email management tasks. Consequently, an attacker can achieve arbitrary code execution on behalf of the authenticated user, bypassing same-origin policy restrictions and gaining access to sensitive data stored within the application environment.
From a threat intelligence perspective, this vulnerability aligns with MITRE ATT&CK technique T1059: Command and Scripting Interpreter, specifically JavaScript sub-technique T1059.007. The attack chain typically involves initial delivery via social engineering through email, followed by execution within the victim's browser environment. Once executed, the malicious script can perform a variety of harmful actions including session hijacking, where the attacker steals cookies or authentication tokens to impersonate the user; keylogging to capture sensitive information typed into forms; or redirection to phishing sites designed to harvest credentials from other services associated with the compromised account. The persistence of this risk is heightened by the fact that Roundcube is widely deployed in enterprise and organizational environments for web-based email access, making it a high-value target for attackers seeking lateral movement or data exfiltration within internal networks.
Mitigation strategies must prioritize immediate software updates to address the root cause of the input validation failure. Administrators should upgrade Roundcube Webmail to version 1.6.19 or later if running the stable branch, or to version 1.7.4 and above for the development branch. These releases contain patches that implement proper sanitization routines when converting text/enriched parts to HTML, ensuring that all special characters are escaped before being rendered in the editor. In scenarios where immediate patching is not feasible due to operational constraints, organizations should consider implementing a web application firewall with rules capable of detecting and blocking cross-site scripting payloads within email body content. Additionally, enabling Content Security Policy headers can help mitigate the impact by restricting the sources from which scripts are allowed to execute, thereby reducing the effectiveness of any injected malicious code even if it manages to bypass other defenses. Regular security audits and penetration testing focused on input validation in webmail applications are also recommended to identify similar weaknesses before they can be exploited.