CVE-2025-47946
symfony/ux-live-component and symfony/ux-twig-component vulnerable to unsanitized HTML attribute injection via ComponentAttributes
Also known as GHSA-5j3w-5pcr-f8hg
Mitigation
- Upgrade symfony/ux-twig-component to 2.25.1 or later.
- Upgrade symfony/ux-live-component to 2.25.1 or later.
Who should check
- Projects that depend on Packagist package symfony/ux-twig-component (< 2.25.1)
- Projects that depend on Packagist package symfony/ux-live-component (< 2.25.1)
- Anyone running symfony ux < 2.25.1
Vulnerability facts
- Affected
- symfony/ux-twig-component < 2.25.1; symfony/ux-live-component < 2.25.1
- Fixed in
- 2.25.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.43% chance of exploitation in 30 days (percentile 29, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Packagist symfony/ux-twig-component | < 2.25.1 | 2.25.1 | osv |
| Packagist symfony/ux-live-component | < 2.25.1 | 2.25.1 | osv |
| symfony ux | < 2.25.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-47946. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-47946.md Affected: symfony/ux-twig-component < 2.25.1; symfony/ux-live-component < 2.25.1 Fixed in: 2.25.1 Steps: 1. Search this machine and project for symfony/ux-twig-component (Packagist), symfony/ux-live-component (Packagist), symfony ux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
- https://github.com/symfony/ux/commit/b5d1c85995c128cb926d47a96cfbfbd500b643a8
- https://github.com/symfony/ux-live-component/commit/7ad44cf56d750b9f56658ed986286a10da132ee7
- https://github.com/symfony/ux-twig-component/commit/b5d4e77db69315aeb18d2238e0e7c943d340ce76
- https://github.com/symfony/ux/commit/c2f7738ee0969c31df7514025a7f5fc6e153932d
Other
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-live-component/CVE-2025-47946.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-twig-component/CVE-2025-47946.yaml
- https://github.com/symfony/ux
- https://symfony.com/blog/symfony-ux-cve-2025-47946-unsanitized-html-attribute-injection-via-componentattributes
FAQ
Is CVE-2025-47946 being exploited?
There is no confirmed exploitation: CVE-2025-47946 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.43% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-47946?
Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2025-47946?
symfony/ux-twig-component < 2.25.1; symfony/ux-live-component < 2.25.1.
Is there a fix for CVE-2025-47946?
Yes. Fixed in 2.25.1. Upgrade symfony/ux-twig-component to 2.25.1 or later. Upgrade symfony/ux-live-component to 2.25.1 or later.
How do I check if I'm affected by CVE-2025-47946?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.