CVE-2026-133777: XSS in symfony/ux-icons via SVG Content That Browsers Parse as HTML: Incomplete Fix for CVE-2026-55877
The fix for CVE-2026-55877 (GHSA-6v8j-33hc-mv84) sanitizes the SVG of icons before they are rendered inline. Browsers parse an inline <svg> element with the rules of SVG, until they meet a start tag like <p>, <img> or <meta>. They then parse the rest of the icon as HTML, and they also parse the content of <title> and <desc> elements as HTML. The sanitizer only checked icons as SVG, so an icon could contain markup that becomes live once parsed as HTML. For example, after a <p> element, a comment can end a <style> element early and add an <img> element with an event handler:
<p/><style><!--</style><img src=1 onerror=alert(1)>--></style>
In the same way, an icon could add a <base> element to the page, which changes where its relative links and forms go. It could also add a <meta> element that redirects the page.
Comments were kept too, while browsers end a comment at <!--> or <!--->. The rest of such a comment then became live markup, even without any HTML element before it.
Applications are exposed when an attacker can influence the SVG of the icons they render. The sources are the same as for CVE-2026-55877, like local icon files and the responses of the Iconify API.
The sanitizer now removes comments and the elements that make browsers switch to HTML, and only keeps the text of <title> and <desc> elements. It also makes sure that markup in CDATA sections and attribute values can't end a <noscript> element around the icon.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications are exposed when an attacker can influence the SVG content of icons rendered inline. Relevant sources include local icon files and responses obtained from the Iconify API.
What could successful exploitation allow?
An attacker-controlled icon can introduce HTML that executes through event handlers, such as an image onerror handler. It may also inject a base element that changes relative link and form destinations, or a meta element that redirects the page.
Why does SVG sanitization not prevent this attack?
Browsers can switch from SVG parsing to HTML parsing after certain tags, including p, img, or meta, and parse title and desc contents as HTML. Markup that is harmless under SVG-only sanitization can therefore become active HTML when the icon is rendered inline.