CVE-2026-9818
Executive Summary
CVE-2026-9818 is a Server-Side Request Forgery (SSRF) vulnerability in Roundcube Webmail, specifically within the HTML sanitization path used for rendering email messages. The flaw allows a remote attacker to craft an HTML email containing URLs that reference loopback addresses (127.0.0.1), localhost, RFC1918 private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), link-local addresses (169.254.0.0/16), and Unique Local Addresses (ULA, fc00::/7). Even when the user has disabled remote content loading in Roundcube, these URLs are not filtered, causing the victim's browser to issue requests to internal or private-network services simply by opening the message preview pane.
The CVSS score is 4.7 (Medium), with a vector emphasizing network attack vector, low attack complexity, no privileges required, user interaction required, and a changed scope. The EPSS score is 0.0%, indicating no active exploitation in the wild at the time of analysis. No public proof-of-concept code or patch details are currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Roundcube is a widely deployed open-source webmail client, often installed via package managers (e.g., apt, yum) or manual deployment from source. The vulnerability affects the core HTML sanitization logic, which is part of the Roundcube application itself, not a third-party library. Organizations using Roundcube should monitor official channels for patch announcements and consider applying virtual patches via WAF rules until an official fix is released.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is carried out over the network via email.
- Attack Complexity (AC): Low (L) – No special conditions or race conditions are required.
- Privileges Required (PR): None (N) – The attacker does not need any authentication.
- User Interaction (UI): Required (R) – The victim must open the malicious email in Roundcube.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope (internal network).
- Confidentiality (C): Low (L) – Limited information disclosure from internal services.
- Integrity (I): None (N) – No data modification.
- Availability (A): None (N) – No denial of service.
Threat Level: Medium. While the CVSS score is moderate, the potential for internal network reconnaissance and exploitation of other internal services elevates the risk in enterprise environments.
Deep Dive & Mechanics
The vulnerability resides in Roundcube's HTML sanitization routine, which is responsible for stripping dangerous content from HTML emails. The sanitizer uses a whitelist-based approach to allow certain HTML tags and attributes, but it fails to properly validate URLs in attributes like href, src, and background. Specifically, the sanitizer does not block URLs pointing to:
- Loopback:
127.0.0.1,localhost - RFC1918:
10.x.x.x,172.16-31.x.x,192.168.x.x - Link-local:
169.254.x.x - ULA:
fc00::/7,fd00::/7
When a user opens an HTML email, Roundcube renders it in the browser. If the email contains an <img> tag with a src attribute pointing to an internal IP, the browser will attempt to load that resource, effectively performing an SSRF request from the victim's browser to the internal service. This can be used to:
- Scan internal networks for open ports.
- Access internal web applications (e.g., admin panels, APIs).
- Exploit vulnerabilities in internal services (e.g., unauthenticated RCE in a Jenkins instance).
- Perform DNS rebinding attacks if the attacker controls a domain that resolves to an internal IP.
The attack does not require the victim to click any link; simply previewing the message in the reading pane triggers the request.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code path is identified in the HTML sanitizer. The sanitizer likely uses a function like rcube_utils::xss_clean() or similar, which filters URLs based on a whitelist of allowed schemes (e.g., http, https, mailto) but does not check the host part against private IP ranges.
Vulnerable Code (Conceptual):
// In rcube_utils.php or similar
function xss_clean($html) {
// ... sanitization logic ...
// Does NOT filter private IPs in URLs
$html = preg_replace('/<a\s[^>]*href="(https?:\/\/[^"]+)"/i', '<a href="$1"', $html);
// ...
}
Patched Code (Expected):
function xss_clean($html) {
// ... sanitization logic ...
// Block private IPs
$html = preg_replace('/<a\s[^>]*href="(https?:\/\/(127\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.|\[?f[cd][0-9a-f]{2}:))[^"]*"/i', '', $html);
// ...
}
Exploitation & Lab Setup
Red Team
Objective: Perform internal network reconnaissance via SSRF.
Lab Setup:
- Deploy a vulnerable Roundcube instance (e.g., version 1.5.x or earlier) on a server with internal services (e.g., a Jenkins instance on 192.168.1.100:8080).
- Attacker sends an HTML email to a victim user.
Exploit Email (HTML):
<html>
<body>
<img src="http://192.168.1.100:8080/script?cmd=whoami" width="1" height="1" />
<img src="http://127.0.0.1:3306" width="1" height="1" />
<img src="http://[fd00::1]:22" width="1" height="1" />
</body>
</html>
Steps:
- Attacker crafts the email and sends it to the victim.
- Victim opens the email in Roundcube (preview pane or full view).
- The victim's browser makes requests to the internal IPs.
- Attacker monitors internal service logs or uses a callback server to confirm requests.
Advanced Technique: Use DNS rebinding to bypass same-origin policy and read responses from internal services.
Blue Team
Detection:
- Monitor Roundcube access logs for requests to private IP ranges from the webmail interface.
- Use network monitoring to detect outbound connections from Roundcube servers to internal IPs (should be rare).
- Deploy a WAF rule to block URLs containing private IPs in email content.
Hunting Query (Splunk):
index=webmail sourcetype=roundcube:access
| search uri_path IN ("/webmail/*")
| rex field=uri "http://(?<target_ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
| where match(target_ip, "^(10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|127\.|169\.254\.)")
| stats count by src_ip, target_ip, uri
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests from Roundcube server to private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, fc00::/7).
- DNS queries for domains that resolve to private IPs (DNS rebinding indicator).
- Email IOCs:
- HTML emails containing
<img>,<iframe>,<link>, or<script>tags withsrcorhrefpointing to private IPs. - Emails with base64-encoded or obfuscated URLs that decode to private IPs.
- HTML emails containing
- File IOCs:
- Roundcube log entries showing requests to private IPs (e.g.,
/var/log/roundcube/errors.log).
- Roundcube log entries showing requests to private IPs (e.g.,
Detection Engineering
YARA Rule
rule CVE_2026_9818_SSRF_Email {
meta:
description = "Detects HTML emails containing private IP URLs targeting Roundcube SSRF"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2026-9818"
strings:
$private_ip = /(https?:\/\/)(127\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.|\[?f[cd][0-9a-f]{2}:)/
$html_tag = /<(img|iframe|link|script)[^>]+(src|href)=/
condition:
$html_tag and $private_ip
}
Sigma Rule
title: Roundcube SSRF via HTML Email
id: 8f4a3b2c-1d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects HTTP requests from Roundcube to private IP ranges, indicating SSRF exploitation
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-uri-query|contains:
- 'http://10.'
- 'http://172.16.'
- 'http://172.17.'
- 'http://172.18.'
- 'http://172.19.'
- 'http://172.20.'
- 'http://172.21.'
- 'http://172.22.'
- 'http://172.23.'
- 'http://172.24.'
- 'http://172.25.'
- 'http://172.26.'
- 'http://172.27.'
- 'http://172.28.'
- 'http://172.29.'
- 'http://172.30.'
- 'http://172.31.'
- 'http://192.168.'
- 'http://127.'
- 'http://169.254.'
- 'http://[fc'
- 'http://[fd'
condition: selection
falsepositives:
- Legitimate internal monitoring tools
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2026-9818 Roundcube SSRF Attempt to Private IP";
flow:to_server,established;
content:"GET"; http_method;
content:"http://"; distance:0;
pcre:"/http:\/\/(127\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|192\.168\.|169\.254\.|\[?f[cd][0-9a-f]{2}:)/i";
classtype:attempted-recon;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable HTML email rendering in Roundcube (set
$config['prefer_html'] = false;in config.inc.php). - Enable remote content loading blocking (already default, but ensure it's enforced).
- Apply a WAF rule to block private IPs in email content (e.g., ModSecurity rule).
- Disable HTML email rendering in Roundcube (set
Short-term:
- Monitor Roundcube's official GitHub and mailing list for patches.
- Implement a custom patch to filter private IPs in the HTML sanitizer (see Vulnerable vs. Patched Code section).
Long-term:
- Upgrade to a patched version once released.
- Conduct a security audit of Roundcube's HTML sanitization logic.
- Implement network segmentation to limit the impact of SSRF attacks.
Valters IT Signature: This report was generated by Valters IT DevSecOps AI. For questions, contact support@valters-it.com.