/

CVE-2026-62643

Severity:

HIGH RISK

(7.2)

SSRF via CSS Sanitization (CWE-918) in Roundcube

CVE-2026-62643

Analyzed

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

Insufficient CSS sanitization in Roundcube Webmail's handling of HTML email allows external stylesheets to reference internal or sensitive network resources.

When a user opens a crafted email, the server or client can be tricked into making unintended HTTP requests, potentially exposing information from internal services or private endpoints.

Affected context

The vulnerability appears in Roundcube Webmail deployments that allow rendering of HTML emails with embedded or linked stylesheets.

It becomes relevant when CSS sanitization does not fully restrict external stylesheet URLs, including those pointing to internal or non-public network locations.

Environments where the Roundcube server or the user's browser has network visibility into internal services, metadata endpoints, or administration interfaces are at particular risk of SSRF-driven information exposure.

Exploit preconditions

  • Attack surface: HTML email processing in Roundcube Webmail.
  • Required access: Ability to send or relay emails that will be opened by a Roundcube user (no direct server access required).
  • Trigger point: Viewing or previewing a malicious HTML email containing CSS constructs or stylesheet links that reference attacker-chosen URLs.
  • Why exploitation is possible: The CSS sanitization logic does not fully validate or strip dangerous stylesheet references, enabling crafted CSS to cause the application or client to load resources from internal or sensitive locations.

Why this happens

The underlying issue is incomplete sanitization of CSS in HTML content, specifically around external stylesheet references and URL-bearing CSS constructs.

This maps to CWE-918: Server-Side Request Forgery (SSRF), where an application can be induced to initiate network requests to arbitrary locations because URL inputs or references are not sufficiently constrained.

In this case, the CSS filtering logic fails to robustly normalize, parse, and restrict all possible URL schemes, hosts, or CSS features that can trigger resource loading, leaving pathways for attacker-controlled links to target internal network resources.

Potential impact

  • Access to internal HTTP endpoints via SSRF, which may expose metadata or configuration information.
  • Disclosure of information from services that are only reachable from the Roundcube server's network environment.
  • Discovery of internal hostnames, ports, or service behavior through response-side information leaks.
  • Facilitation of further attacks if internal applications trust requests originating from the Roundcube server or user's browser.

General mitigation guidance

Effective mitigation focuses on tight control of CSS-based resource loading and constraining network reachability:

  • Apply strict sanitization on HTML and CSS content, removing or neutralizing all external stylesheet references and URL-bearing CSS properties from untrusted email content.
  • Prefer a conservative allowlist approach for supported CSS constructs, rejecting or stripping anything not explicitly needed for safe rendering.
  • Enforce network egress controls so that the webmail server and related components cannot freely access internal administration networks, cloud metadata endpoints, or other sensitive internal services.
  • Isolate the mail rendering component from high-value internal networks, and apply least-privilege principles to any network paths available to it.
  • Consider rendering risky email content in a more restricted mode (e.g., plain text or heavily sanitized HTML) for untrusted senders or unknown sources.

How teams detect issues like this

Detection commonly involves a mix of content analysis and network monitoring:

  • Static review of HTML/CSS sanitization logic to identify insufficient handling of external URLs, CSS @import rules, or URL-like functions in styles.
  • Security-focused code reviews that flag any HTML/CSS processing paths that pass external URLs through without robust normalization and validation.
  • Use of static analysis or linting rules that highlight custom CSS or HTML filtering code and require explicit security review.
  • Network monitoring and logging to spot unusual outbound HTTP(S) requests from the webmail server, especially to internal IP ranges or unexpected hosts.
  • Integration of security testing tools or proxies that can replay malicious emails and observe whether the application attempts to fetch internal resources.

Sources

SourceLink
github.comgithub.com/roundcube/roundcubemail/commit/294c7da6e7284166f040cef8607b677d459e0786
github.comgithub.com/roundcube/roundcubemail/commit/6d69e094d55d3a9a84dfb36edf6ca985311f0c1c
github.comgithub.com/roundcube/roundcubemail/releases/tag/1.6.17
github.comgithub.com/roundcube/roundcubemail/releases/tag/1.7.2
roundcube.netroundcube.net/news/2026/07/05/security-updates-1.6.17-and-1.7.2

Frequently asked

questions

Yes. An attacker can exploit this by sending a crafted HTML email to a user of the affected Roundcube instance; when the message is rendered, it can cause unintended requests to attacker-chosen targets, including internal hosts that are not directly reachable from the internet.

Direct authentication to the Roundcube server is not required for the attacker; they only need the ability to deliver email to a mailbox accessed via Roundcube. However, the victim typically must be logged into Roundcube and open or preview the malicious email for the issue to be triggered.

The safest pattern is to treat all HTML email content, including CSS, as untrusted and aggressively sanitize it: remove external stylesheet links and URL-based CSS constructs, and adopt a strict allowlist of safe elements and properties. Complement this with network-layer controls that prevent the mail application from reaching sensitive internal endpoints.

Use well-maintained, security-aware sanitization libraries for HTML and CSS; implement defense-in-depth with egress filtering and network segmentation; and ensure that any feature capable of making network requests from user-supplied content is scrutinized during design, code review, and security testing.

Find out what's already
exploitable in your codebase.