/

CVE-2026-48848

Severity:

HIGH RISK

(7.2)

Cross-Site Scripting (XSS) in Roundcube Webmail

CVE-2026-48848

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Client-Side Code Execution / Cross-Site Scripting

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Roundcube Webmail 1.6.x before 1.6.16 and 1.7.x before 1.7 contains insufficient HTML sanitization that allows CSS injection through crafted SVG content using animate elements with the attributeName attribute.

When untrusted HTML or SVG content is rendered in the webmail interface, an attacker could inject styles that influence how content is displayed, potentially enabling cross-site scripting (XSS)-style attacks in certain browser contexts.

Affected context

This vulnerability occurs in Roundcube Webmail when user-controlled or external HTML content is displayed within the message reading or preview interface.

The issue is specifically triggered by SVG documents embedded in emails (or related content) that include animate elements with an attributeName attribute, which are not fully sanitized or stripped before rendering.

Environments that automatically display rich HTML emails, allow embedded SVGs, or rely on browser-based rendering of email content are more exposed to this risk.

Exploit preconditions

  • Attack surface: Webmail user interface rendered in a browser
  • Required access: Ability to send or cause display of a crafted email (or HTML/SVG content) to a Roundcube user
  • Trigger point: User opens, previews, or interacts with the malicious email or content in the Roundcube interface
  • Why exploitation is possible: The HTML/SVG sanitization pipeline fails to fully neutralize CSS injection via SVG animate elements using attributeName, allowing attacker-supplied styling or behavior to affect the rendered page

Why this happens

The root cause lies in insufficient output sanitization and filtering of SVG-based HTML content before it is rendered in the browser.

While Roundcube attempts to sanitize HTML, its filtering rules do not comprehensively handle SVG animate elements and the attributeName attribute, leaving a path for CSS injection.

This maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), where untrusted content can inject or alter client-side behavior because it is included in the DOM without robust canonicalization, filtering, or contextual escaping.

Potential impact

  • Unauthorized injection of CSS that may influence layout and visibility of UI elements
  • Potential for XSS-like behaviors in supporting browsers, such as:
  • Session token exposure via DOM manipulations or overlays
  • User interface redressing or deceptive content presentation
  • Phishing or credential theft through manipulated webmail views
  • Privacy exposure through subtle content exfiltration patterns, depending on browser capabilities and security settings

General mitigation guidance

Mitigation typically focuses on hardening the HTML and SVG sanitization pipeline and reducing trust in content rendered from emails or external sources.

Recommended defensive patterns include:

  • Applying strict whitelisting-based sanitization for SVG and HTML, explicitly removing or neutralizing risky elements (e.g., animate) and attributes (e.g., attributeName)
  • Normalizing and validating all embedded SVG content before it is passed to the browser, including blocking active or animated constructs by default
  • Rendering email content in a restricted, sandboxed context with limited scripting and styling capabilities where feasible
  • Implementing a defense-in-depth approach by enforcing Content Security Policy (CSP) rules to constrain where styles and scripts can originate
  • Minimizing reliance on rich HTML rendering for untrusted content, or providing a plain-text / simplified HTML view as the default for security-sensitive users

How teams detect issues like this

Detection efforts can focus on both code-level and behavior-level indicators:

  • Static analysis and code review:
  • Look for HTML sanitization routines that pass through or partially filter SVG content, especially animate elements and attributes that can influence styles or timing
  • Identify HTML/DOM insertion points that accept untrusted email content without robust contextual encoding or sanitization
  • Runtime and behavioral monitoring:
  • Instrument client-side logging (e.g., CSP violation reports) to detect unexpected style or script behavior originating from email-rendered content
  • Monitor user reports and security logs for anomalous UI behavior within the webmail interface, particularly unusual overlays or visual manipulations
  • Policy and validation checks:
  • Enforce security review of sanitization libraries and configuration changes that affect HTML/SVG handling
  • Utilize automated security testing tools capable of injecting crafted SVG payloads to validate that sanitization is effective

Sources

SourceLink
github.comgithub.com/roundcube/roundcubemail/commit/58e5263f341e6a418774fb6d2643669a3c4d8a27
github.comgithub.com/roundcube/roundcubemail/commit/c960d102472dc579e15907d5bcdc3103a090ccf9
github.comgithub.com/roundcube/roundcubemail/releases/tag/1.6.16
github.comgithub.com/roundcube/roundcubemail/releases/tag/1.7.1
roundcube.netroundcube.net/news/2026/05/24/security-updates-1.6.16-and-1.7.1

Frequently asked

questions

Exploitability depends on the browser environment and how Roundcube is configured, but in general, an attacker who can send HTML/SVG emails can attempt to exploit the insufficient sanitization to inject CSS or achieve XSS-like effects when a user views the malicious message.

Typically, the attacker does not need authenticated access to the Roundcube instance; the main requirement is the ability to deliver or cause rendering of crafted email content to a logged-in user. The victim must log into Roundcube and open or preview the malicious message.

The safest fix is to enforce strict, whitelist-based HTML/SVG sanitization, explicitly disallowing or stripping complex or active SVG constructs such as animate elements and dangerous attributes. Rendering paths should treat all email content as untrusted and apply sanitization consistently before insertion into the DOM.

To prevent similar issues, maintain a dedicated security review process for HTML and SVG sanitization logic, rely on well-maintained sanitization libraries, and enforce strong Content Security Policies. Additionally, adopt a "least functionality" approach to rich content in webmail, disabling unnecessary active content types and regularly testing against known HTML/SVG XSS vectors.

Find out what's already
exploitable in your codebase.