{"id":"CVE-2026-49216","aliases":["CVE-2026-49216","GHSA-mwqm-4fw3-cjvr"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony UX: XSS in symfony/ux-autocomplete via unescaped AJAX response data","summary":"Symfony UX is a JavaScript ecosystem for Symfony. From 2.2.0 until 2.36.0 and 3.1.0, the Stimulus controller in symfony/ux-autocomplete renders AJAX response items in _createAutocompleteWithRemoteData() by interpolating the text field into HTML template literals (<div>${item[labelField]}</div>) rather than text, allowing attacker-controlled markup from user-supplied dropdown values to execute in the browser of any user who opens an autocomplete widget backed by the same data. This issue is fixed in versions 2.36.0 and 3.1.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Symfony UX is a JavaScript ecosystem for Symfony. From 2.2.0 until 2.36.0 and 3.1.0, the Stimulus controller in symfony/ux-autocomplete renders AJAX response items in _createAutocompleteWithRemoteData() by interpolating the text field into HTML template literals (<div>${item[labelField]}</div>) rather than text, allowing attacker-controlled markup from user-supplied dropdown values to execute in the browser of any user who opens an autocomplete widget backed by the same data. This issue is fixed in versions 2.36.0 and 3.1.0.","source":"cvelist"},{"lang":"en","text":"### Description\n\nThe Stimulus controller shipped with `symfony/ux-autocomplete` renders AJAX response items into the dropdown by interpolating the `text` field directly into HTML template literals (`<div>${item[labelField]}</div>`) inside `_createAutocompleteWithRemoteData()`. The value is parsed as HTML rather than text, so any markup contained in the AJAX response is executed by the browser.\n\nWhen the dropdown values are derived from user-supplied content, an attacker can craft a string that triggers stored XSS in the browser of any other user who later opens a page containing an autocomplete widget backed by the same data.\n\n### Resolution\n\nThe `option` and `item` renderers used in `_createAutocompleteWithRemoteData()` now use TomSelect's `escape` helper to HTML-escape the value by default. Endpoints that legitimately return HTML (for example, to highlight the search term) can opt back in to the previous behavior by setting `options_as_html: true`. The `AutocompleteChoiceTypeExtension` normalizer that previously forced `options_as_html=false` when `autocomplete_url` was set has been dropped so the opt-in is reachable from the form layer.\n\nThe patch for this issue is available [here](https://github.com/symfony/ux/commit/842ae54bc74de389299f975f01aafae272cb0019) for branch 2.x (and forward-ported to 3.x).\n\n### Credits\n\nSymfony would like to thank Alex Ashkov 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 la versión 2.2.0 hasta la 2.36.0 y la 3.1.0, el controlador Stimulus en symfony/ux-autocomplete renderiza elementos de respuesta AJAX en _createAutocompleteWithRemoteData() interpolando el campo de texto en literales de plantilla HTML ([div]${item[labelField]}[/div]) en lugar de como texto, permitiendo que marcado controlado por el atacante, proveniente de valores de menú desplegable proporcionados por el usuario, se ejecute en el navegador de cualquier usuario que abra un widget de autocompletado respaldado por los mismos datos. Este problema está solucionado en las versiones 2.36.0 y 3.1.0.","source":"nvd"}],"published":"2026-06-19T19:35:05.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 3.0.0, < 3.1.0","status":"affected"},{"version":"< 2.36.0","status":"affected"}],"vendor":"symfony","product":"ux","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.2.0","status":"affected","fixed":"2.36.0"}],"ecosystem":"Packagist","package":"symfony/ux-autocomplete","purl":"pkg:composer/symfony/ux-autocomplete","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"3.1.0"}],"ecosystem":"Packagist","package":"symfony/ux-autocomplete","purl":"pkg:composer/symfony/ux-autocomplete","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.2.0","fixed":"2.36.0"},{"status":"affected","version":"3.0.0"}],"vendor":"symfony","product":"ux","cpe":"cpe:2.3:a:symfony:ux:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/ux/security/advisories/GHSA-mwqm-4fw3-cjvr","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/ux/commit/842ae54bc74de389299f975f01aafae272cb0019","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/ux/releases/tag/v2.36.0","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/ux/releases/tag/v3.1.0","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-autocomplete/CVE-2026-49216.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-21T01:43:58.784Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49216","url":"https://www.cve.org/CVERecord?id=CVE-2026-49216","licence":"CVE Terms of Use","modified":"2026-07-21T01:44:13.539Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mwqm-4fw3-cjvr","url":"https://github.com/advisories/GHSA-mwqm-4fw3-cjvr","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:09.172Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49216","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49216","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.499Z","epss":{"score":0.00312,"percentile":0.16469,"date":"2026-11-30T12:00:22.000Z"}}