Roundcube Webmail Style Sanitizer can be bypassed using CSS Character Escapes
The style sanitizer in Roundcube Webmail can be bypassed by using CSS character escapes to create HTML entities, allowing arbitrary inline CSS such as url() to be injected. An attacker can send a malicious email that, when opened in HTML mode, causes the victim's browser to make a request to an attacker-controlled URL, revealing the victim's IP address and user agent.
Originally disclosed on HackerOne
- Triaged in 3 days
- Fixed in 17 days
- Disclosed after 48 days
Summary:
The style sanitizer in Roundcube Webmail can be bypassed by creating HTML entities using CSS character escapes. This allows using arbitrary inline CSS, like e.g. url(), and retrieve the IP address and user agent of the person reading the email.
Steps To Reproduce:
- Send an HTML email to your account with the following contents:
<div style='content: "\0026quot;; background: url(//http.cat/418); content:""; width: 100%; height: 100%;'>hi, this shouldn't work :(</div>
- Open the email in Roundcube in the HTML mode
The background image will be applied to the element, causing a HTTP request to https://http.cat/418
Supporting Material/References:


Explanation
\0026 is a CSS entity and will be decoded to &. Together with the quot; afterwards, this will close the string token and cause the rest of the string token to be interpreted as CSS.

Impact
An attacker can send a malicious email to a victim and retrieve the victim's IP address and user agent.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the sanitizer does not properly decode CSS character escapes before checking for dangerous CSS properties, allowing an attacker to construct a string that closes a CSS string token and injects arbitrary CSS.
Impact
An attacker can send a malicious email to a victim and retrieve the victim's IP address and user agent.
What the attacker needed
Victim uses Roundcube webmail; victim opens email in HTML mode
How it was found
- Send an HTML email to your account with a crafted style attribute containing CSS character escapes.
- Open the email in Roundcube in HTML mode.
- The background image is applied, causing an HTTP request to the attacker's URL.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Roundcube is a webmail program. It tries to clean up CSS (the code that styles web pages) in emails so that attackers cannot track you. This report shows a clever trick using special character codes in CSS to sneak past that cleaning, so an attacker can make your email program load a hidden image from their server, which tells them your IP address and browser details.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.