{"id":"CVE-2026-55877","aliases":["CVE-2026-55877","GHSA-6v8j-33hc-mv84"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony UX: XSS in symfony/ux-icons via unsanitized SVG content in local files and Iconify on-demand responses","summary":"Symfony UX is a JavaScript ecosystem for Symfony. From 2.17.0 before 2.36.1 and from 3.0.0 before 3.2.0, the ux_icon() Twig function is marked is_safe=['html'] and Icon::toHtml() inlines SVG source verbatim, allowing unsanitized local SVG files or Iconify on-demand JSON body responses containing nested script elements, on* event handlers, or dangerous URL schemes to execute cross-site scripting. This issue is fixed in versions 2.36.1 and 3.2.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Symfony UX is a JavaScript ecosystem for Symfony. From 2.17.0 before 2.36.1 and from 3.0.0 before 3.2.0, the ux_icon() Twig function is marked is_safe=['html'] and Icon::toHtml() inlines SVG source verbatim, allowing unsanitized local SVG files or Iconify on-demand JSON body responses containing nested script elements, on* event handlers, or dangerous URL schemes to execute cross-site scripting. This issue is fixed in versions 2.36.1 and 3.2.0.","source":"cvelist"},{"lang":"en","text":"### Description\n\nThe `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.\n\nTwo 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).\n\n### Resolution\n\nIntroducing 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. \n`<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. \n\n### Credits\n\nSymfony would like to thank Pascal Cescon for reporting the issue and Hugo Alliaume for providing the fix.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Symfony UX es un ecosistema JavaScript para Symfony. Desde 2.17.0 antes de 2.36.1 y desde 3.0.0 antes de 3.2.0, la función Twig ux_icon() está marcada como is_safe=[’html’] e Icon::toHtml() inserta el código fuente SVG textualmente, permitiendo que archivos SVG locales no saneados o respuestas de cuerpo JSON bajo demanda de Iconify que contengan elementos de script anidados, manejadores de eventos on, o esquemas de URL peligrosos ejecuten cross-site scripting. Este problema está solucionado en las versiones 2.36.1 y 3.2.0.","source":"nvd"}],"published":"2026-06-19T21:42:15.000Z","modified":"2026-10-25T17:10:00.197Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 2.17.0, < 2.36.1","status":"affected"},{"version":">= 3.0.0, < 3.2.0","status":"affected"}],"vendor":"symfony","product":"ux","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.17.0","status":"affected","fixed":"2.36.1"}],"ecosystem":"Packagist","package":"symfony/ux-icons","purl":"pkg:composer/symfony/ux-icons","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"3.2.0"}],"ecosystem":"Packagist","package":"symfony/ux-icons","purl":"pkg:composer/symfony/ux-icons","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.17.0","fixed":"2.36.1"},{"status":"affected","introduced":"3.0.0","fixed":"3.2.0"}],"vendor":"symfony","product":"ux","cpe":"cpe:2.3:a:symfony:ux:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/ux/security/advisories/GHSA-6v8j-33hc-mv84","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/ux/commit/3a4964ec3700f0af4e13f7bfbf8bb3174c3e79d1","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/ux/releases/tag/v2.36.1","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/ux/releases/tag/v3.2.0","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-icons/CVE-2026-55877.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/ux","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-09T14:21:00.657Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55877","url":"https://www.cve.org/CVERecord?id=CVE-2026-55877","licence":"CVE Terms of Use","modified":"2026-07-09T14:40:25.026Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6v8j-33hc-mv84","url":"https://github.com/advisories/GHSA-6v8j-33hc-mv84","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:08.052Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55877","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55877","licence":"Public domain","modified":"2026-10-25T17:10:00.197Z"}],"updatedAt":"2026-11-25T22:59:27.455Z","epss":{"score":0.00336,"percentile":0.28927,"date":"2026-12-01T12:00:22.000Z"}}