Roundcube Webmail Persistent Cross-Site Scripting (XSS)
CVE-2023-5631 is a medium-severity improper neutralization of input during web page generation vulnerability in Roundcubemail from Roundcube, with a CVSS 3.1 base score of 5.4 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, but only if a user takes part, for example by opening a link or file. The record lists versions 1.6.3, 1.5.4, 1.5.14 as the first without the flaw, so updating Roundcubemail to one of those releases or later removes the exposure. CISA added it to the Known Exploited Vulnerabilities catalogue on October 26, 2023, which means attacks have been observed in the wild.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Roundcubemail to 1.6.3 or 1.5.4 or 1.5.14, whichever matches your release line, or a later version.
- Update Webmail to 1.4.15 or 1.5.5 or 1.6.4, whichever matches your release line, or a later version.
- CISA's required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Roundcube | Roundcubemail | 1.6.0 up to, but not including, 1.6.3; 1.5.0 up to, but not including, 1.5.4; 1.4.0 up to, but not including, 1.5.14 | 1.6.3, 1.5.4, 1.5.14 |
| Roundcube | Webmail | before 1.4.15; 1.5.0 up to, but not including, 1.5.5; 1.6.0 up to, but not including, 1.6.4 | 1.4.15, 1.5.5, 1.6.4 |
| Debian | Debian Linux | 10.0; 11.0; 12.0 | Not stated |
| Fedora Project | Fedora | 39 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- LowSome restricted data can be read.
- Integrity
- LowLimited modification of data is possible.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 6.1 | Medium | CNA (eset.com) |
| CVSS 3.1 | 5.4 | Medium | NVD |
Official 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: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Neutralization of Input During Web Page Generation
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.
How developers prevent this class of flaw
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
- For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
More Improper Neutralization of Input During Web Page Generation vulnerabilities (CWE-79)
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054079Mailing List
- github.com/roundcube/roundcubemail/commit/41756cc3331b495cc0b71886984474dc529dd31d
- github.com/roundcube/roundcubemail/commit/6ee6e7ae301e165e2b2cb703edf75552e5376613
- github.com/roundcube/roundcubemail/releases/tag/1.4.15Release Notes
- github.com/roundcube/roundcubemail/releases/tag/1.5.5Release Notes
- github.com/roundcube/roundcubemail/releases/tag/1.6.4Release Notes
- roundcube.net/news/2023/10/16/security-update-1.6.4-releasedRelease Notes
- roundcube.net/news/2023/10/16/security-updates-1.5.5-and-1.4.15Release Notes
Third-party and government advisories
- openwall.com/lists/oss-security/2023/11/01/1Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2023/11/01/3Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2023/11/17/2Mailing List, Third Party Advisory
- lists.debian.org/debian-lts-announce/2023/10/msg00035.htmlMailing List, Third Party Advisory
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-5631US Government Resource
Technical write-ups (may include proof of concept)
- github.com/roundcube/roundcubemail/issues/9168Exploit, Issue Tracking
Other references
Recent Improper Neutralization of Input During Web Page Generation vulnerabilities
- 9.6 Critical severity
- 7.6 High severity
- 8.7 High severity
- 9.6 Critical severity
- 9.0 Critical severity
- 8.2 High severity
Spotted an error? Tell us.