High severity8.8NVD Advisory· Published Feb 4, 2022· Updated Jun 17, 2026
CVE-2022-23614
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
twig/twigPackagist | >= 2.0.0, < 2.14.11 | 2.14.11 |
twig/twigPackagist | >= 3.0.0, < 3.3.8 | 3.3.8 |
Affected products
6cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*+ 1 more
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
Patches
Vulnerability mechanics
References
16- github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9nvdPatchThird Party AdvisoryWEB
- github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5nvdPatchThird Party AdvisoryWEB
- github.com/advisories/GHSA-5mv2-rx3q-4w2vghsaADVISORY
- github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2vnvdThird Party AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2022-23614ghsaADVISORY
- www.debian.org/security/2022/dsa-5107nvdThird Party AdvisoryWEB
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2022-23614.yamlghsaWEB
- lists.fedoraproject.org/archives/list/[email protected]/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YOghsaWEB
- lists.fedoraproject.org/archives/list/[email protected]/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7ghsaWEB
- lists.fedoraproject.org/archives/list/[email protected]/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZghsaWEB
- lists.fedoraproject.org/archives/list/[email protected]/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSADghsaWEB
- symfony.com/blog/twig-security-release-disallow-non-closures-in-the-sort-filterghsaWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/nvd
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/nvd
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/nvd
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/nvd
News mentions
0No linked articles in our index yet.