CVE-2023-46734: Symfony potential Cross-site Scripting vulnerabilities in CodeExtension filters
Description
Some Twig filters in CodeExtension use "issafe=html" but don't actually ensure their input is safe.
Resolution
Symfony now escapes the output of the affected filters.
The patch for this issue is available here for branch 4.4.
Credits
We would like to thank Pierre Rudloff for reporting the issue and to Nicolas Grekas for providing the fix.
Other sources
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Starting in versions 2.0.0, 5.0.0, and 6.0.0 and prior to versions 4.4.51, 5.4.31, and 6.3.8, some Twig filters in CodeExtension use issafe=html but don't actually ensure their input is safe. As of versions 4.4.51, 5.4.31, and 6.3.8, Symfony now escapes the output of the affected filters.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/symfony/symfonyto a version that resolves this vulnerability.Fixed in 6.3.8 - Upgrade
Upgrade
composer/symfony/symfonyto a version that resolves this vulnerability.Fixed in 5.4.31 - Upgrade
Upgrade
composer/symfony/symfonyto a version that resolves this vulnerability.Fixed in 4.4.51 - Upgrade
Upgrade
composer/symfony/twig-bridgeto a version that resolves this vulnerability.Fixed in 6.3.8 - Upgrade
Upgrade
composer/symfony/twig-bridgeto a version that resolves this vulnerability.Fixed in 5.4.31 - Upgrade
Upgrade
composer/symfony/twig-bridgeto a version that resolves this vulnerability.Fixed in 4.4.51 - Upgrade
Upgrade
debian/symfonyto a version that resolves this vulnerability.Fixed in 4.4.19+dfsg-2+deb11u6Fixed in 5.4.23+dfsg-1+deb12u4Fixed in 6.4.18+dfsg-1 - Upgrade
Upgrade
CodeExtension (Symfony Twig filters with is_safe=html)to a version that resolves this vulnerability.Fixed in 4.4.51 - Upgrade
Upgrade
CodeExtension (Symfony Twig filters with is_safe=html)to a version that resolves this vulnerability.Fixed in 5.4.31 - Upgrade
Upgrade
CodeExtension (Symfony Twig filters with is_safe=html)to a version that resolves this vulnerability.Fixed in 6.3.8
Event History
Frequently Asked Questions
What is the severity of CVE-2023-46734?
The severity of CVE-2023-46734 is medium.
What is the description of CVE-2023-46734?
CVE-2023-46734 is a vulnerability in Symphony CodeExtension filters that allows potential cross-site scripting (XSS) attacks.
How can the potential cross-site scripting (XSS) vulnerabilities in Symphony CodeExtension filters be exploited?
The potential cross-site scripting (XSS) vulnerabilities in Symphony CodeExtension filters can be exploited by injecting malicious code into user input fields that are not properly sanitized.
What is the recommended remedy for CVE-2023-46734?
To remediate CVE-2023-46734, update Symphony to version 6.3.8 or later or version 5.4.31 or later.
Where can I find more information about CVE-2023-46734?
You can find more information about CVE-2023-46734 in the following references: [reference 1](https://github.com/symfony/symfony/security/advisories/GHSA-q847-2q57-wmr3), [reference 2](https://github.com/symfony/symfony/commit/5d095d5feb1322b16450284a04d6bb48d1198f54), [reference 3](https://github.com/symfony/symfony/commit/9da9a145ce57e4585031ad4bee37c497353eec7c).