Twig security release: disallow non closures in the sort filter
Twig >2.0.0,<2.14.11 || >3.0.0,<3.3.8 are affected by this security issue. Twig 1.x is not affected as the "sort" filter does not allow an arrow function in that version.
The issue has been fixed in Twig 2.14.11 and 3.3.8.
When in a sandbox mode, the
arrow parameter of the
sort filter must be a closure to avoid attackers being able to run arbitrary PHP functions.
We now disallow calling non Closure in the
sort filter like we already did for some other filters.
We would like to thank Marlon Starkloff for reporting the issue and Fabien Potencier for fixing the issue.
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.