/

CVE-2026-48843

Severity:

HIGH RISK

(7.2)

SSRF in Roundcube Webmail HTML Email Rendering

CVE-2026-48843

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Server-Side Request Forgery and Information Disclosure

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 between 1.6.14 and 1.6.16, and 1.7.x before 1.7.1, contains insufficient sanitization of CSS in HTML email content, allowing external stylesheet references to untrusted locations.

When stylesheet links can point to internal or sensitive network endpoints, this behavior may be abused for server-side request forgery (SSRF) or information disclosure via the Roundcube server.

Affected context

The vulnerability exists in Roundcube Webmail's HTML email rendering pipeline when displaying messages that contain CSS, including external stylesheet references.

It becomes relevant where:

  • HTML email rendering is enabled and used by users
  • CSS and <link rel="stylesheet"> or similar constructs are not fully sanitized
  • The Roundcube server has network connectivity to internal services or metadata endpoints that are not directly exposed to email senders

Deployments with broader internal network access from the webmail server are more exposed to SSRF-style abuse.

Exploit preconditions

  • Attack surface: HTML email rendering in Roundcube Webmail.
  • Required access: Ability to send or relay HTML emails to users whose messages are rendered by the vulnerable Roundcube instance (typically any authenticated mail sender or external email source, depending on mail gateway configuration).
  • Trigger point: A user opens or previews a crafted HTML email, causing Roundcube to process embedded CSS and external stylesheet references.
  • Why exploitation is possible: CSS sanitization is incomplete, allowing stylesheet URLs that can cause the Roundcube server to initiate HTTP/HTTPS requests to attacker-chosen targets, including internal hosts, leading to SSRF or indirect exposure of response-dependent information.

Why this happens

This issue is an instance of CWE-918: Server-Side Request Forgery, where a server component is tricked into making network requests to attacker-selected endpoints.

Roundcube's HTML sanitization logic for CSS did not sufficiently restrict which URLs could be referenced from stylesheets in incoming email content.

As a result, external stylesheet links in email could still reference internal or sensitive network locations.

Because the webmail server, not the end-user's browser, performs or mediates these requests, an external attacker can leverage the server's network position to probe internal services or cause information to be disclosed through side channels such as load timing, error messages, or resource-dependent rendering.

Potential impact

  • The Roundcube server may issue HTTP/HTTPS requests to internal network services controlled only by internal administrators.
  • Attackers could use the server as a pivot to scan internal IP ranges and identify live hosts or open ports.
  • Certain responses or behaviors could leak information about internal endpoints (e.g., existence of services, resource sizes, or error states).
  • In some deployment scenarios, the server might access cloud metadata endpoints or administrative interfaces, potentially exposing configuration or token data if additional weaknesses exist.
  • Increased risk of chaining with other vulnerabilities (e.g., misconfigured internal services) for deeper compromise.

General mitigation guidance

Mitigation generally focuses on tightening HTML and CSS sanitization and constraining the server's network capabilities:

  • Enforce strict allowlists for URL schemes and domains in all CSS and HTML attributes that can load remote resources, blocking access to internal IP ranges, loopback addresses, and link-local or metadata hosts.
  • Normalize and canonicalize URLs before applying filters to avoid bypasses via obfuscation (e.g., encoded IPs, mixed schemes, or redirects).
  • Consider disabling or heavily restricting external resource loading from email content, favoring inline-safe styles or a predefined stylesheet set.
  • Reduce the Roundcube server's network reach by segmenting it from sensitive internal services and metadata endpoints, and applying egress firewall rules where possible.
  • Apply defense-in-depth by running the webmail application with least-privilege network and OS permissions so that any SSRF impact is bounded.

How teams detect issues like this

Detection can be approached at both the code and operational levels:

  • Static analysis and code review: Look for HTML and CSS sanitization routines that:
  • Allow arbitrary URL targets in style or link tags
  • Lack checks against private IP ranges and loopback addresses
  • Fail to normalize URLs before validation
  • Security testing: Use application-level scanning to send crafted HTML emails with external stylesheet references targeting:
  • Internal IP ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
  • Loopback addresses (127.0.0.0/8, ::1)
  • Cloud metadata endpoints

and monitor whether the server initiates outgoing requests.

  • Network and log monitoring: Inspect outbound HTTP/HTTPS traffic from the Roundcube server for unusual destinations or patterns aligned with email reception and viewing.
  • Automated review tools: Integrate web application security scanners and linters that include SSRF-oriented checks for server-side resource fetching and URL handling.

Sources

SourceLink
github.comgithub.com/roundcube/roundcubemail/commit/ab96c88bfd888866ec5e02190b19618db283923a
github.comgithub.com/roundcube/roundcubemail/commit/cb3fc9041e91640ba9ba49ee7b2147c176ebf5a1
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

Yes. A remote attacker who can send HTML emails that are processed by the vulnerable Roundcube instance can attempt to exploit the flaw once a recipient opens or previews the message.

Typically, an attacker only needs the ability to deliver HTML email to a mailbox hosted or viewed through the vulnerable Roundcube server. No direct login to the Roundcube server itself is required, though standard email delivery constraints (such as anti-spam or authentication requirements) still apply.

Apply robust, centralized sanitization for all HTML and CSS originating from email, with strict URL validation and blocking of internal or sensitive network destinations. Where feasible, avoid loading external resources from emails altogether and rely on a controlled subset of allowed styles.

Adopt a default-deny approach to server-initiated network requests triggered by user-controlled content, rigorously validate URLs before any fetch, and regularly review HTML/CSS sanitization logic. Complement this with network-level egress controls and automated testing for SSRF patterns in your web applications.

Find out what's already
exploitable in your codebase.