Stored XSS vulnerability in Roundcube (CVE-2023-5631)
Published In CISA KEV since Sources: pwn.watch, CVE.org, Debian, OSV
What is affected, what to do
Roundcube before 1.4.15, 1.5.x before 1.5.5, and 1.6.x before 1.6.4 allows stored XSS via an HTML e-mail message with a crafted SVG document because of program/lib/Roundcube/rcube_washtml.php behavior. This could allow a remote attacker to load arbitrary JavaScript code.
The vulnerability is being actively exploited; treat it as a priority. Update Roundcubemail to version 1.6.3, Roundcubemail to version 1.5.4, Roundcubemail to version 1.5.14. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- Roundcubemail
lt 1.6.0..1.6.3 - Roundcubemail
lt 1.5.0..1.5.4 - Roundcubemail
lt 1.4.0..1.5.14
- Roundcubemail
- Fixed in
- Roundcubemail
1.6.3 - Roundcubemail
1.5.4 - Roundcubemail
1.5.14
- Roundcubemail
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
6.1
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: Vendor (CNA), CVSS v3
6.1
CVSS v3
Severity Medium on the scale from 0 to 10.
Source: pwn.watch, CVE.org, Debian, OSV
76.3 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.54
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 213.39 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploited
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 6.1 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 6.1
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 76.3 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.54
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- CISA assessment (SSVC)
- Exploitation: active · not automatable · Technical impact: total
- Source: CISA Vulnrichment, as of 15 November 2023
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-79
Response and mitigation
Why act now?
Prioritisation rationale
The flaw is reachable over the network with low complexity. An attacker only needs to deliver a crafted email, and the victim only needs to open it in Roundcube. The scope change then gives script access to the victim's entire mailbox session. EPSS places it among the CVEs most likely to be exploited. Observed targeting focuses on government bodies, organisations with diplomatic or political ties, and operators of self-hosted webmail. The goal is espionage and mailbox theft rather than ransomware; CISA lists no known ransomware use. Despite the moderate base severity, treat any internet-facing Roundcube deployment, especially in public-sector or critical-infrastructure organisations, as critical. Patch it, or neutralise it with prefer_html = false, within 24 hours.
Runbook step 1
Immediate response (0-24 h)
- Inventory every Roundcube instance and confirm its version: Per the CVE description, all releases before 1.4.15, 1.5.x before 1.5.5 and 1.6.x before 1.6.4 are vulnerable. Check
RCMAIL_VERSIONinprogram/include/iniset.phpor the "About" dialog. The affected-products list in the context shows some inconsistent fix versions. Treat vendor releases 1.4.15 / 1.5.5 / 1.6.4 as authoritative. - Patch: Upgrade to 1.6.4, 1.5.5 or 1.4.15, ideally the latest release on your branch. On Debian 10/11/12 or Fedora 39, update the distro
roundcube/roundcubemailpackage. Look up the exact package version in the distribution's security advisory. Restart PHP-FPM and the web server, then clear the cache. - If you cannot upgrade right away, disable HTML rendering globally: Set
$config['prefer_html'] = false;inconfig/config.inc.php. HTML mail then renders as plain text, which keeps the SVG path throughrcube_washtml.phpout of reach. Addprefer_htmlto$config['dont_override']so users cannot switch it back on. - Retro-hunt mailboxes: Grep the mail store (Dovecot/Cyrus) for HTML messages that contain
<svg,<useandhref="data:image/svg+xml;base64,. Quarantine any hits and notify the recipients. - Contain affected accounts: For every hit, kill the account's Roundcube sessions (
sessiontable) and force a password reset. Audit forwarding and Sieve rules and sender identities for unauthorised changes.
- Inventory every Roundcube instance and confirm its version: Per the CVE description, all releases before 1.4.15, 1.5.x before 1.5.5 and 1.6.x before 1.6.4 are vulnerable. Check
Runbook step 2
Mitigation layers
- Network exposure: Publish webmail only behind a VPN or zero-trust access proxy. This does not stop the malicious mail from being delivered, but it limits session hijacking and replay from foreign networks.
- Mail gateway filtering: Quarantine or defang inbound HTML mail that embeds an SVG
<use>element pointing at adata:URI. A SpamAssassin/rspamd regex shape is/<use[^>]+href\s*=\s*["']?data:image\/svg\+xml/i. Score inline SVG as high risk when it decodes to<scriptoron\w+=handlers. - Reverse-proxy CSP: Add a Content-Security-Policy that constrains exfiltration, e.g.
connect-src 'self'; img-src 'self' data:; form-action 'self'; frame-ancestors 'self'. Roundcube relies on inline scripts, soscript-srccannot be fully locked down. Validate the policy in staging before rolling it out. - IAM and session protection: Enforce MFA, either with a Roundcube 2FA plugin or upstream SSO. Shorten
$config['session_lifetime']and set cookies toHttpOnly,SecureandSameSite=Strict. - Configuration hardening: Block remote content by default with
$config['show_images'] = 0;. Remove unused plugins. Block external auto-forwarding at the MTA/Sieve layer so that a hijacked session cannot set up silent mail forwarding.
Runbook step 3
Detection rules
- MTA / mail gateway logs: Look for inbound
text/htmlmessages whose body contains<svgtogether withdata:image/svg+xml;base64. Sigma shape:keywords|all: ['<svg', '<use', 'data:image/svg+xml;base64']. Raise severity when the sender uses a freemail or newly registered domain. - Web access logs (Roundcube): Watch for
_task=mail&_action=showfollowed within seconds by a burst of_action=viewsource,_action=exportor_action=showcalls across many distinct_uidvalues in the same session. That pattern indicates scripted mailbox exfiltration. SPL:index=web uri_query="*_task=mail*" (uri_query="*_action=viewsource*" OR uri_query="*_action=export*") | stats dc(uid) as n by session,src_ip | where n>20 - Settings tampering: Flag POSTs to
_action=plugin.managesieve-save,_action=save-identityor_action=save-prefthat land right after a message was opened, especially when they add forwarding targets at external domains. - Proxy / Zeek telemetry: Look for browser connections to previously unseen domains, or large outbound POSTs, that carry the Roundcube host as Referer. KQL:
CommonSecurityLog | where RequestContext has "<roundcube-host>" and DestinationHostName !endswith "<own-domain>" - Roundcube logs (
logs/userlogins.log,logs/errors.log): Watch for logins to the same account from new IPs or ASNs shortly after a suspicious message was delivered. This suggests stolen credentials or a replayed session.
- MTA / mail gateway logs: Look for inbound
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
Roundcube before 1.4.15, 1.5.x before 1.5.5, and 1.6.x before 1.6.4 allows stored XSS via an HTML e-mail message with a crafted SVG document because of program/lib/Roundcube/rcube_washtml.php behavior. This could allow a remote attacker to load arbitrary JavaScript code.
Source: pwn.watch, NVD (NIST), cvelistv5, CISA KEV Catalog, CVE.org (MITRE), Debian Security Advisories, OSV (Open Source Vulnerabilities)
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| Roundcube | Roundcubemail |
|
|
| roundcube | webmail |
|
|
Distribution and container packages (2)
Downstream packages (e.g. Bitnami, Debian, Ubuntu, Red Hat). Versions refer to the distribution, not the vendor.
| Affected versions | Fixed in | ||
|---|---|---|---|
| bitnami | roundcube |
|
|
Vendors and products
Affected operating systems
| Linux | debian | debian_linux | 10.0 |
| Linux | debian | debian_linux | 11.0 |
| Linux | debian | debian_linux | 12.0 |
| Linux | debian | roundcube | bookworm |
| Linux | debian | roundcube | bullseye |
| Other | fedoraproject | fedora | 39 |
Weakness classes (CWE)
CWE-79Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Base
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Entry at MITRE CWE-79
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited | |
| Reference tagged as exploit | github.com (opens in a new tab) | PoC (publicly reported)reported, not verified | — |
References & sources
- openwall.comlists/oss-security/2023/11/01/1web, Mailing list, Third-party advisory
- openwall.comlists/oss-security/2023/11/01/3web, Mailing list, Third-party advisory
- openwall.comlists/oss-security/2023/11/17/2web, Mailing list, Third-party advisory
- bugs.debian.orgcgi-bin/bugreport.cgi?bug=1054079web, Mailing list, Patch
- github.comroundcube/roundcubemail/commit/41756cc3331b495cc0b71886984474dc…web, Patch
- github.comroundcube/roundcubemail/commit/6ee6e7ae301e165e2b2cb703edf75552…web, Patch
- github.comroundcube/roundcubemail/issues/9168web, Exploit, Issue tracking
- github.comroundcube/roundcubemail/releases/tag/1.4.15web, Release notes
- github.comroundcube/roundcubemail/releases/tag/1.5.5web, Release notes
- github.comroundcube/roundcubemail/releases/tag/1.6.4web, Release notes
- lists.debian.orgdebian-lts-announce/2023/10/msg00035.htmlweb, Mailing list, Third-party advisory
- lists.fedoraproject.orgarchives/list/package-announce@lists.fedoraproject.org/message/…web, Mailing list
- roundcube.netnews/2023/10/16/security-update-1.6.4-releasedweb, Release notes
- roundcube.netnews/2023/10/16/security-updates-1.5.5-and-1.4.15web, Release notes
- debian.orgsecurity/2023/dsa-5531web, Mailing list
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2023-5631government-resource, US government resource
- pwn.watchpwn.watch: Roundcube Webmail: Persistent Cross-Site Scripting (XSS) (CVE-2023-5631)pwn-watch
- roundcube.netVendor advisory: Roundcube Webmailpwn-watch
- NVD (NIST)NVD: CVE-2023-5631pwn-watch
- cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2023-5631"><img src="https://intel.neosec.eu/badge/cve/CVE-2023-5631.svg?lang=en" alt="CVE-2023-5631 – NEOSEC Intel" height="20"></a>