MediumGHSA-q847-2q57-wmr3BIT-symfony-2023-46734CVE-2023-46734

Symfony potential Cross-site Scripting vulnerabilities in CodeExtension filters

Published 12 Nov 2023 · Updated 10 Sept 2026

Affected packages

Affected
>=2.0.0 <4.4.51
Fixed in
4.4.51
Update to the fixed version for your release line, for example:composer require symfony/twig-bridge:^4.4.51
Affected
>=5.0.0 <5.4.31
Fixed in
5.4.31
Update to the fixed version for your release line, for example:composer require symfony/twig-bridge:^5.4.31
Affected
>=6.0.0 <6.3.8
Fixed in
6.3.8
Update to the fixed version for your release line, for example:composer require symfony/twig-bridge:^6.3.8
Affected
>=2.0.0 <4.4.51
Fixed in
4.4.51
Update to the fixed version for your release line, for example:composer require symfony/symfony:^4.4.51
Affected
>=5.0.0 <5.4.31
Fixed in
5.4.31
Update to the fixed version for your release line, for example:composer require symfony/symfony:^5.4.31
Affected
>=6.0.0 <6.3.8
Fixed in
6.3.8
Update to the fixed version for your release line, for example:composer require symfony/symfony:^6.3.8

Details

Description

Some Twig filters in CodeExtension use "is_safe=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.

Is GHSA-q847-2q57-wmr3 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/twig-bridge, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.