All vulnerability reports

XSS in Vaadin Icon via an SVG loaded through the src property

Overview

The Vaadin Icon component renders an SVG loaded through its src property into the page without removing active content, so an SVG that carries event handler attributes runs script in the application's origin. Applications that point src at files or URLs supplied by their users, such as per user avatars or icons stored in a dataset, are the ones exposed. This vulnerability has been addressed in the latest supported versions of Vaadin. Users are advised to upgrade.


Are you affected?

  • Affected: applications on Vaadin 24.2 through 25.3 that set src on vaadin-icon, or SvgIcon's src constructors or setSrc, to a URL, a stream resource or a data: URI whose content the application does not control.
  • Not affected: applications that only use named icons from an icon set, such as VaadinIcon or Icon, or that load icons from SVG files shipped with the application; applications on Vaadin 24.1 or older, which have no src loading code at all; and applications already on the fixed versions below.
  • What to do: update to the fixed version for your Vaadin line, in the table below. No code changes are needed, but read the note under the table first, because the fix narrows what an icon loaded through src is allowed to render.

Description

An icon loaded through src is fetched, parsed, and the markup inside the fetched <svg> element is rendered into the live DOM. Nothing removes active content on the way, so SVG event handler attributes survive the round trip and execute when the browser inserts the elements. <image onerror=...> and <set onbegin=...> both fire without the user touching the icon, and the script runs in the application's origin, with access to the session the victim is already in.

The fetch is a cross origin request, which is no barrier: an attacker serving the SVG controls the response headers and allows it. A data: URI carrying the same markup reaches the same code path without any fetch at all.

Flow applications reach it through SvgIcon, whose src constructors, setSrc(String) and stream resource variants set the same property. The precondition in every case is the same: the SVG, or the URL it comes from, is data the application does not control.

The src property was added in Vaadin 24.2.0. Nothing before that loads an SVG from a URL into the icon.

Fixed versions

Update to the version listed for your Vaadin line:
Vaadin version Maintenance status Update to How to get it
25.3 Free maintenance 25.3.6 Free
25.2 End of life 25.3.6 or newer Free, after moving to 25.3
25.1 End of life 25.3.6 or newer Free, after moving to 25.3
25.0 End of life 25.3.6 or newer Free, after moving to 25.3
24.10 Extended Maintenance 24.10.15 Enterprise subscription
24.9 Extended Maintenance 24.9.27 Enterprise subscription
24.8 End of life 24.10.15 or newer Enterprise subscription
24.7 Extended Maintenance 24.7.20 Enterprise subscription
24.6 End of life 24.10.15 or newer Enterprise subscription
24.5 End of life 24.10.15 or newer Enterprise subscription
24.4 Extended Maintenance 24.4.29 Enterprise subscription
24.3 End of life 24.10.15 or newer Enterprise subscription
24.2 End of life 24.10.15 or newer Enterprise subscription
Vaadin 24.1 and older are not affected. The end of life lines above received no fix of their own and will not get one.

The fix restricts what an icon loaded through src renders. An icon loaded from a file without an id no longer renders <style>, <image>, <foreignObject>, <a> or <set>, nor references to other files. Icons that need styling should use presentation attributes such as fill instead of a <style> element.

Can't upgrade right away?

Do not set src, or SvgIcon's src constructors and setSrc methods, to a value the application does not control, and do not serve user uploaded SVG files through it. Point it only at SVG files that ship with the application or that an administrator has reviewed.

Where the SVG itself has to come from users, sanitize it on the server before storing or serving it, with a library that removes event handler attributes, scripts and external references from SVG.

Running an older Vaadin version?

The Vaadin 24 line is no longer under free maintenance, so 24.4.29, 24.7.20, 24.9.27 and 24.10.15 are available to Extended Maintenance customers. Applications on an end of life 24 minor, or on 25.0, 25.1 or 25.2, have no fix on their own line and have to move to a line that has one. Moving to 25.3.6 is free.

Artifacts

Maven coordinates Vulnerable version Fixed version
com.vaadin:vaadin 24.2.0 - 24.2.13 ≥24.10.15
com.vaadin:vaadin 24.3.0 - 24.3.21 ≥24.10.15
com.vaadin:vaadin 24.4.0 - 24.4.28 ≥24.4.29
com.vaadin:vaadin 24.5.0 - 24.5.15 ≥24.10.15
com.vaadin:vaadin 24.6.0 - 24.6.13 ≥24.10.15
com.vaadin:vaadin 24.7.0 - 24.7.19 ≥24.7.20
com.vaadin:vaadin 24.8.0 - 24.8.17 ≥24.10.15
com.vaadin:vaadin 24.9.0 - 24.9.26 ≥24.9.27
com.vaadin:vaadin 24.10.0 - 24.10.14 ≥24.10.15
com.vaadin:vaadin 25.0.0 - 25.0.13 ≥25.3.6
com.vaadin:vaadin 25.1.0 - 25.1.13 ≥25.3.6
com.vaadin:vaadin 25.2.0 - 25.2.14 ≥25.3.6
com.vaadin:vaadin 25.3.0 - 25.3.5 ≥25.3.6
com.vaadin:vaadin-core 24.2.0 - 24.2.13 ≥24.10.15
com.vaadin:vaadin-core 24.3.0 - 24.3.21 ≥24.10.15
com.vaadin:vaadin-core 24.4.0 - 24.4.28 ≥24.4.29
com.vaadin:vaadin-core 24.5.0 - 24.5.15 ≥24.10.15
com.vaadin:vaadin-core 24.6.0 - 24.6.13 ≥24.10.15
com.vaadin:vaadin-core 24.7.0 - 24.7.19 ≥24.7.20
com.vaadin:vaadin-core 24.8.0 - 24.8.17 ≥24.10.15
com.vaadin:vaadin-core 24.9.0 - 24.9.26 ≥24.9.27
com.vaadin:vaadin-core 24.10.0 - 24.10.14 ≥24.10.15
com.vaadin:vaadin-core 25.0.0 - 25.0.13 ≥25.3.6
com.vaadin:vaadin-core 25.1.0 - 25.1.13 ≥25.3.6
com.vaadin:vaadin-core 25.2.0 - 25.2.14 ≥25.3.6
com.vaadin:vaadin-core 25.3.0 - 25.3.5 ≥25.3.6
com.vaadin:vaadin-icons-flow 24.2.0 - 24.2.12 ≥24.10.15
com.vaadin:vaadin-icons-flow 24.3.0 - 24.3.20 ≥24.10.15
com.vaadin:vaadin-icons-flow 24.4.0 - 24.4.28 ≥24.4.29
com.vaadin:vaadin-icons-flow 24.5.0 - 24.5.14 ≥24.10.15
com.vaadin:vaadin-icons-flow 24.6.0 - 24.6.12 ≥24.10.15
com.vaadin:vaadin-icons-flow 24.7.0 - 24.7.19 ≥24.7.20
com.vaadin:vaadin-icons-flow 24.8.0 - 24.8.16 ≥24.10.15
com.vaadin:vaadin-icons-flow 24.9.0 - 24.9.26 ≥24.9.27
com.vaadin:vaadin-icons-flow 24.10.0 - 24.10.14 ≥24.10.15
com.vaadin:vaadin-icons-flow 25.0.0 - 25.0.13 ≥25.3.6
com.vaadin:vaadin-icons-flow 25.1.0 - 25.1.13 ≥25.3.6
com.vaadin:vaadin-icons-flow 25.2.0 - 25.2.13 ≥25.3.6
com.vaadin:vaadin-icons-flow 25.3.0 - 25.3.5 ≥25.3.6
@vaadin/icon 24.2.0 - 24.2.9 ≥24.10.11
@vaadin/icon 24.3.0 - 24.3.22 ≥24.10.11
@vaadin/icon 24.4.0 - 24.4.21 ≥24.4.22
@vaadin/icon 24.5.0 - 24.5.12 ≥24.10.11
@vaadin/icon 24.6.0 - 24.6.11 ≥24.10.11
@vaadin/icon 24.7.0 - 24.7.13 ≥24.7.14
@vaadin/icon 24.8.0 - 24.8.14 ≥24.10.11
@vaadin/icon 24.9.0 - 24.9.22 ≥24.9.23
@vaadin/icon 24.10.0 - 24.10.10 ≥24.10.11
@vaadin/icon 25.0.0 - 25.0.13 ≥25.3.6
@vaadin/icon 25.1.0 - 25.1.14 ≥25.3.6
@vaadin/icon 25.2.0 - 25.2.17 ≥25.3.6
@vaadin/icon 25.3.0 - 25.3.5 ≥25.3.6
The vulnerable code is in the npm package the component resolves, @vaadin/icon. Those numbers are not the Vaadin version numbers: Vaadin 25.3.6 resolves @vaadin/icon 25.3.7, and Vaadin 24.10.15 resolves @vaadin/icon 24.10.11.

Credits

Reported by Arittro Sarkar.

References


Questions about this advisory can be sent to security@vaadin.com.

History

  • 2026-11-26: Initial vulnerability report published