CVE-2026-49216: Symfony UX: XSS in symfony/ux-autocomplete via unescaped AJAX response data

Published Jun 19, 2026
·
Updated

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 optionsashtml: true. The AutocompleteChoiceTypeExtension normalizer that previously forced optionsashtml=false when autocompleteurl 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.

Other sources

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.

MITRE

Affected Software

4 affected componentsFixes available
composer/symfony/ux-autocomplete>=3.0.0<3.1.0
3.1.0
composer/symfony/ux-autocomplete>=2.2.0<2.36.0
2.36.0
Symfony UX>=2.2.0<2.36.0
Symfony UX=3.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/symfony/ux-autocomplete to a version that resolves this vulnerability.

    Fixed in 3.1.0
  2. Upgrade

    Upgrade composer/symfony/ux-autocomplete to a version that resolves this vulnerability.

    Fixed in 2.36.0
  3. Upgrade

    Upgrade symfony/ux-autocomplete to a version that resolves this vulnerability.

    Fixed in 2.36.0
  4. Upgrade

    Upgrade symfony/ux-autocomplete to a version that resolves this vulnerability.

    Fixed in 3.1.0
  5. Configuration

    Ensure `options_as_html` is not set to `true` for `symfony/ux-autocomplete`; default behavior escapes item values, while opting back in to `options_as_html: true` restores rendering AJAX response items as HTML via `<div>${item[labelField]}</div>`.

    symfony/ux-autocomplete Stimulus controller options_as_html = false

Event History

Jun 19, 2026
Advisory Published
via GitHub·07:35 PM
Data Sourced
via GitHub·07:35 PM
DescriptionWeaknessAffected Software
Jul 17, 2026
CVE Published
via MITRE·04:15 PM
Data Sourced
via MITRE·04:15 PM
DescriptionWeakness
Data Sourced
via NVD·05:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-49216?

CVE-2026-49216 has a medium severity rating of 5.1 according to the CVSS.

2

How do I fix CVE-2026-49216?

To fix CVE-2026-49216, ensure that AJAX response data is properly sanitized before rendering it to prevent XSS vulnerabilities.

3

What type of vulnerability is CVE-2026-49216?

CVE-2026-49216 is classified as a Cross-Site Scripting (XSS) vulnerability.

4

Which software is affected by CVE-2026-49216?

CVE-2026-49216 affects the Symfony UX component, specifically the symfony/ux-autocomplete package.

5

When was CVE-2026-49216 published?

CVE-2026-49216 was published on June 19, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203