Skip to main content

Symfony UX Icons CVE-2026-55877

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-19 https://github.com/symfony/ux GHSA-6v8j-33hc-mv84
6.1
CVSS 3.1 · Vendor: https://github.com/symfony/ux
Share

Severity by source

Vendor (https://github.com/symfony/ux) PRIMARY
6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI
6.1 MEDIUM

Iconify path is network-reachable with no auth required; victim must load the page (UI:R); SVG inline execution crosses to browser origin (S:C); no availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (https://github.com/symfony/ux).

CVSS VectorVendor: https://github.com/symfony/ux

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 19, 2026 - 23:49 vuln.today
Analysis Generated
Jun 19, 2026 - 23:49 vuln.today

DescriptionCVE.org

Description

The ux_icon() Twig function is marked is_safe=['html'], so Twig never escapes its output. Icon::toHtml() inlines the SVG source verbatim into the page. Browsers execute <script> elements and on* event-handler attributes found inside inline SVG, making any unsanitized icon a vector for cross-site scripting.

Two code paths were affected. In the local file path, Icon::fromFile() only stripped <script> elements that were direct children of <svg>, leaving nested scripts and all on* attributes untouched despite a code comment claiming broader protection. In the Iconify on-demand path (enabled by default), the remote JSON body field was wrapped into an Icon object with no sanitization at all. Concrete attack vectors include a malicious SVG icon pack from a third-party theme or downloaded icon set, or a controlled Iconify endpoint configured via iconify.endpoint (including a poisoned cache).

Resolution

Introducing an IconFactory that centralizes sanitization across every icon source before an Icon object is created. The sanitizer removes script-capable elements (script, foreignObject, iframe, object, embed), SMIL animations targeting on*, href, or xlink:href attributes, CDATA sections, processing instructions, all on* attributes, and javascript:, vbscript:, and data:text/html URL schemes. <style> elements are kept for theming but have any handlers stripped. Icons that contain none of these constructs are byte-for-byte identical after sanitization.

Credits

Symfony would like to thank Pascal Cescon for reporting the issue and Hugo Alliaume for providing the fix.

AnalysisAI

Cross-site scripting in Symfony UX Icons (symfony/ux-icons) allows an attacker who controls SVG icon content - via a malicious third-party icon pack, a downloaded icon set, or a tampered Iconify on-demand endpoint - to inject and execute arbitrary JavaScript in the browsers of users who load any page rendering those icons. Two distinct sanitization failures existed: the local-file path in Icon::fromFile() only stripped top-level <script> children of <svg>, ignoring nested scripts and all on* event-handler attributes, while the Iconify on-demand path (enabled by default) applied zero sanitization to the remote JSON body field before inlining it as HTML. No public exploit code has been identified at time of analysis, and this CVE does not appear in the CISA KEV catalog.

Technical ContextAI

Symfony UX Icons (composer package symfony/ux-icons) provides a ux_icon() Twig helper that renders SVG icons inline into HTML pages. Because the function is declared is_safe=['html'], Twig's auto-escaping is intentionally suppressed, delegating all sanitization responsibility to the component itself. Icon::toHtml() writes raw SVG markup verbatim into the document. Browsers execute <script> elements and on* event-handler attributes inside inline SVG, making any unescaped attacker-supplied SVG a CWE-79 (Improper Neutralization of Input During Web Page Generation) vector. The CPE affected packages are pkg:composer/symfony_ux-icons in the 2.17.0-2.36.0 and 3.0.0-3.1.x ranges. The Iconify on-demand code path, which fetches icon data from a configurable remote endpoint (iconify.endpoint) and is active by default, represented the most permissive attack surface because no filtering whatsoever was applied to the fetched JSON body before object construction.

RemediationAI

Upgrade symfony/ux-icons to version 2.36.1 (for the 2.x branch) or 3.2.0 (for the 3.x branch); both versions introduce the new IconFactory class that centralizes sanitization for every icon source before an Icon object is constructed. The sanitizer removes script, foreignObject, iframe, object, and embed elements; strips SMIL animations targeting on*, href, or xlink:href attributes; removes CDATA sections and processing instructions; eliminates all on* event-handler attributes; and blocks javascript:, vbscript:, and data:text/html URL schemes. If an immediate upgrade is not possible, the most effective compensating control is to disable the Iconify on-demand feature entirely by removing or nullifying the iconify.endpoint configuration, since that code path applied no sanitization at all. Additionally, audit all third-party SVG icon packs and downloaded icon sets for script-capable constructs before deployment. Note that disabling the Iconify on-demand path removes the ability to fetch icons dynamically at runtime. Advisory details are available at https://github.com/symfony/ux/security/advisories/GHSA-6v8j-33hc-mv84.

Share

CVE-2026-55877 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy