CVE-2022-23614
Description
Twig is an open source template language for PHP. 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. In affected versions this constraint was not properly enforced and could lead to code injection of arbitrary PHP code. Patched versions now disallow calling non Closure in the `sort` filter as is the case for some other filters. Users are advised to upgrade.
How to fix
- symfony twig2.14.11, 3.3.8 or later
- twig/twig2.14.11, 3.3.8 or later
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/
- debian.org/security/2022/dsa-5107
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| symfony twig | 2.0.0 ≤ v < 2.14.11, 3.0.0 ≤ v < 3.3.8 | 2.14.11, 3.3.8 |
| fedoraproject fedora | 34, 35 | — |
| debian debian_linux | 11.0 | — |
| twig/twigPackagist | 2.0.0 ≤ v < 2.14.11, 3.0.0 ≤ v < 3.3.8 | 2.14.11, 3.3.8 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.