5.1medium
Symfony UX: XSS in symfony/ux-autocomplete via unescaped AJAX response data
- Severity
- 5.1medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.31% (higher than 16% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mwqm-4fw3-cjvr
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| symfony ux | >= 3.0.0, < 3.1.0, < 2.36.0, from 2.2.0 before 2.36.0, 3.0.0 | CVE List, NVD |
| symfony/ux-autocomplete (Packagist) | from 2.2.0 before 2.36.0, from 3.0.0 before 3.1.0 | GitHub Advisory Database |
All scores
| GitHub_M | 5.1medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Description
The 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.
When 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.
Resolution
The 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.
The patch for this issue is available here for branch 2.x (and forward-ported to 3.x).
Credits
Symfony would like to thank Alex Ashkov for reporting the issue and Hugo Alliaume for providing the fix.
NVD (es)
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-49216 changed 2026-07-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mwqm-4fw3-cjvr changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-49216 changed 2026-10-24 | Public domain |