CVE-2026-133775: XSS in symfony/ux-icons via Scripts Nested in SVG Style Elements: 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. It removes scripts and event handlers everywhere, except inside <style> elements.
Unlike in HTML, the content of an SVG <style> element is parsed as markup. An icon can therefore still run JavaScript in the page with, for example:
<style><script>alert(1)</script></style> <style><img src="invalid:" onerror="alert(1)"/></style>
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.
<style> elements are now sanitized like any other element, so their descendants lose scripts and event handlers. A <style> element that tries to close itself early is still removed. Otherwise, its CSS is kept.
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 must an attacker be able to place in an icon SVG to exploit it?
The attacker needs to introduce script-capable markup or event handlers inside an SVG <style> element. Examples include a nested <script> element or an element with an onerror handler.
Does sanitizing scripts and event handlers elsewhere in the SVG prevent this issue?
No. The earlier sanitization removed scripts and event handlers everywhere except within <style> elements, whose SVG content can be parsed as markup.
What behavior does the updated sanitization provide?
It sanitizes <style> elements like other SVG elements, removing scripts and event handlers from their descendants. Style elements attempting to close themselves early are removed, while otherwise-valid CSS is retained.