Cross-site scripting in symfony ux
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| symfony | ux | before 2.25.1 | 2.25.1 | Patch available | CNA |
| — | symfony/ux-twig-component (Packagist) | before 2.25.1 | 2.25.1 | Patch available | GHSA-5j3w-5pcr-f8hg |
| — | symfony/ux-live-component (Packagist) | before 2.25.1 | 2.25.1 | Patch available | GHSA-5j3w-5pcr-f8hg |
- ux Vendorsymfony Affected before 2.25.1 Fixed in 2.25.1 Patch available CNA
- symfony/ux-twig-component (Packagist) Vendor— Affected before 2.25.1 Fixed in 2.25.1 Patch available GHSA-5j3w-5pcr-f8hg
- symfony/ux-live-component (Packagist) Vendor— Affected before 2.25.1 Fixed in 2.25.1 Patch available GHSA-5j3w-5pcr-f8hg
Remediation
- Fix · CNA ux (symfony) Fixed in 2.25.1
- Fix · GHSA-5j3w-5pcr-f8hg symfony/ux-twig-component (Packagist) Fixed in 2.25.1 Advisory →
- Fix · GHSA-5j3w-5pcr-f8hg symfony/ux-live-component (Packagist) Fixed in 2.25.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-47946
- 2026-10-03 Alias added: GHSA-5j3w-5pcr-f8hg
References
Other 9
- https://github.com/symfony/ux/security/advisories/GHSA-5j3w-5pcr-f8hg
- 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
- 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
More symfony vulnerabilities
- TI-2024-33775 Ability to change environment from query in symfony/runtime CVSS 3.1HIGH 7.3
- TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
- TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
- TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
- TI-2026-35851 Incorrect authorization in symfony CVSS 4.0HIGH 8.7
- TI-2026-35264 Improper input validation in symfony CVSS 4.0HIGH 8.3
Sources
- CVE-2025-47946 · CVE Program
- CVE-2025-47946 · NVD
- FIRST EPSS
- GHSA-5j3w-5pcr-f8hg · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences