Code injection in Twig
Package
Affected versions
>= 2.0.0, < 2.14.11
>= 3.0.0, < 3.3.8
Patched versions
2.14.11
3.3.8
Description
Published by the National Vulnerability Database
Feb 4, 2022
Reviewed
Feb 7, 2022
Published to the GitHub Advisory Database
Feb 10, 2022
Last updated
Feb 5, 2024
Description
When in a sandbox mode, the
arrowparameter of thesortfilter must be a closure to avoid attackers being able to run arbitrary PHP functions.Resolution
We now disallow calling non Closure in the
sortfilter like we already did for some other filters.Credits
We would like to thank Marlon Starkloff for reporting the issue and Fabien Potencier for fixing the issue.
References