# CVE-2025-47946: symfony/ux-live-component and symfony/ux-twig-component vulnerable to unsanitized HTML attribute injection via ComponentAttributes

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.43% (percentile 29, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-5j3w-5pcr-f8hg
- **Published:** 2025-05-19T19:25:19.350Z
- **Modified:** 2026-06-17T09:28:52.893Z

## 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

## 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

- Packagist `symfony/ux-twig-component`: affected \< 2.25.1; fixed 2.25.1 (osv)
- Packagist `symfony/ux-live-component`: affected \< 2.25.1; fixed 2.25.1 (osv)
- symfony ux: \< 2.25.1 (cvelist)

## Mitigation

- Upgrade symfony/ux-twig-component to 2.25.1 or later.
- Upgrade symfony/ux-live-component to 2.25.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/symfony/ux/security/advisories/GHSA-5j3w-5pcr-f8hg>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-47946>
- patch: <https://github.com/symfony/ux/commit/b5d1c85995c128cb926d47a96cfbfbd500b643a8>
- patch: <https://github.com/symfony/ux-live-component/commit/7ad44cf56d750b9f56658ed986286a10da132ee7>
- patch: <https://github.com/symfony/ux-twig-component/commit/b5d4e77db69315aeb18d2238e0e7c943d340ce76>
- patch: <https://github.com/symfony/ux/commit/c2f7738ee0969c31df7514025a7f5fc6e153932d>
- other: <https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-live-component/CVE-2025-47946.yaml>
- other: <https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-twig-component/CVE-2025-47946.yaml>
- other: <https://github.com/symfony/ux>
- other: <https://symfony.com/blog/symfony-ux-cve-2025-47946-unsanitized-html-attribute-injection-via-componentattributes>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-47946>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-5j3w-5pcr-f8hg> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-47946> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-47946>
