CVE-2025-47946
symfony/ux-live-component and symfony/ux-twig-component vulnerable to unsanitized HTML attribute injection via ComponentAttributes
Symfony UX is an initiative and set of libraries to integrate JavaScript tools into applications. Prior to version 2.25.1, rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities. The issue is fixed in version 2.25.1 of symfony/ux-twig-component Those who use symfony/ux-live-component must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally. As a workaround, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.1
symfony/ux-live-component and symfony/ux-twig-component vulnerable to unsanitized HTML attribute injection via ComponentAttributes
Symfony UX is an initiative and set of libraries to integrate JavaScript tools into applications. Prior to version 2.25.1, rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities. The issue is fixed in version 2.25.1 of symfony/ux-twig-component Those who use symfony/ux-live-component must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally. As a workaround, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
- Record
CVE-2025-47946- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2025-15795
6.1
Symfony UX is an initiative and set of libraries to integrate JavaScript tools into applications. Prior to version 2.25.1, rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities. The issue is fixed in version 2.25.1 of symfony/ux-twig-component Those who use symfony/ux-live-component must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally. As a workaround, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
- Record
EUVD-2025-15795- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5j3w-5pcr-f8hg
6.1
Symfony UX allows unsanitized HTML attribute injection via ComponentAttributes
Impact
Rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities.
Patches
The issue is fixed in version 2.25.1 of symfony/ux-twig-component by using Twig's EscaperRuntime to properly escape HTML attributes in ComponentAttributes. If you use symfony/ux-live-component, you must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally.
Workarounds
Until you can upgrade, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
References
GitHub repository: symfony/ux
- Record
GHSA-5j3w-5pcr-f8hg- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.1
Symfony UX is an initiative and set of libraries to integrate JavaScript tools into applications. Prior to version 2.25.1, rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities. The issue is fixed in version 2.25.1 of symfony/ux-twig-component Those who use symfony/ux-live-component must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally. As a workaround, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
- Record
CVE-2025-47946- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
symfony/ux-live-component and symfony/ux-twig-component vulnerable to unsanitized HTML attribute injection via ComponentAttributes
Symfony UX is an initiative and set of libraries to integrate JavaScript tools into applications. Prior to version 2.25.1, rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities. The issue is fixed in version 2.25.1 of symfony/ux-twig-component Those who use symfony/ux-live-component must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally. As a workaround, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
- Record
CVE-2025-47946- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-5j3w-5pcr-f8hg
6.1
Symfony UX allows unsanitized HTML attribute injection via ComponentAttributes
Impact
Rendering {{ attributes }} or using any method that returns a ComponentAttributes instance (e.g. only(), defaults(), without()) ouputs attribute values directly without escaping. If these values are unsafe (e.g. contain user input), this can lead to HTML attribute injection and XSS vulnerabilities.
Patches
The issue is fixed in version 2.25.1 of symfony/ux-twig-component by using Twig's EscaperRuntime to properly escape HTML attributes in ComponentAttributes. If you use symfony/ux-live-component, you must also update it to 2.25.1 to benefit from the fix, as it reuses the ComponentAttributes class internally.
Workarounds
Until you can upgrade, avoid rendering {{ attributes }} or derived objects directly if it may contain untrusted values.
Instead, use {{ attributes.render('name') }} for safe output of individual attributes.
References
GitHub repository: symfony/ux
- Record
GHSA-5j3w-5pcr-f8hg- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
symfony/ux-twig-componentPackagist |
before 2.25.1 | 2.25.1 |
symfony/ux-live-componentPackagist |
before 2.25.1 | 2.25.1 |
symfony/ux-twig-componentPackagist |
before 2.25.1, plus listed versions v2.0.0v2.0.1v2.1.0v2.1.1v2.10.0 Show 36 moreShow lessv2.11.0v2.11.1v2.11.2v2.12.0v2.13.0v2.13.1v2.13.3v2.14.0v2.14.2v2.15.0v2.16.0v2.17.0v2.18.0v2.18.1v2.19.0v2.19.2v2.2.0v2.20.0v2.21.0v2.22.0v2.22.1v2.23.0v2.24.0v2.25.0v2.3.0v2.4.0v2.5.0v2.6.0v2.6.1v2.7.0v2.7.1v2.8.0v2.8.1v2.9.0v2.9.1v2.9.2 |
2.25.1 |
symfony/ux-live-componentPackagist |
before 2.25.1, plus listed versions v2.0.0v2.0.1v2.1.0v2.1.1v2.10.0 Show 37 moreShow lessv2.11.0v2.11.1v2.11.2v2.12.0v2.13.0v2.13.1v2.13.2v2.13.3v2.14.0v2.14.1v2.14.2v2.15.0v2.16.0v2.17.0v2.18.0v2.18.1v2.19.0v2.19.2v2.2.0v2.20.0v2.21.0v2.22.0v2.22.1v2.23.0v2.24.0v2.25.0v2.3.0v2.4.0v2.5.0v2.6.0v2.6.1v2.7.0v2.7.1v2.8.0v2.8.1v2.9.0v2.9.1 |
2.25.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-47946 is a medium vulnerability (CVSS 6.1) in Symfony Ux, published May 19, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.25%, the 16th percentile. Fixed in symfony/ux-twig-component 2.25.1.
References
github.com/symfony/ux/security/advisories/GHSA-5j3w-5pcr-f8hg
github.com/symfony/ux/commit/b5d1c85995c128cb926d47a96cfbfbd500b643a8
nvd.nist.gov/vuln/detail/CVE-2025-47946
github.com/symfony/ux-live-component/commit/7ad44cf56d750b9f56658ed986286a10da132ee7
github.com/symfony/ux-twig-component/commit/b5d4e77db69315aeb18d2238e0e7c943d340ce76
github.com/symfony/ux/commit/c2f7738ee0969c31df7514025a7f5fc6e153932d
Show 6 moreShow less
github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-live-component/CVE-2025-47946.yaml
github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-twig-component/CVE-2025-47946.yaml
symfony.com/blog/symfony-ux-cve-2025-47946-unsanitized-html-attribute-injection-via-componentattributes
github.com/advisories/GHSA-5j3w-5pcr-f8hg
github.com/CVEProject/cvelistV5/tree/main/cves/2025/47xxx/CVE-2025-47946.json
github.com/symfony/ux