CVE-2023-46734: Potential XSS vulnerabilities in CodeExtension filters
November 10, 2023 • Published by Fabien Potencier
Affected versions
Symfony versions >=2.0.0,<4.4.51, >=5.0.0,<5.4.31, and =6.0.0,<6.3.8 of the Symfony Twig Bridge are affected by this security issue.
The issue has been fixed in Symfony 4.4.51, 5.4.31, 6.3.8. All other versions are not maintained anymore.
Description
Some filters in the CodeExtension
Twig extension use is_safe=html
but
they don't actually ensure their input is safe.
CodeExtension
is an internal Twig extension that should be only used in
development environments. You might be affected only if you are using this
extension explicitly in production environments.
As of Symfony 6.4, this extension has been marked as @internal
.
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.
Manage your notification preferences to receive an email as soon as a Symfony security release is published.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.