CVE-2022-23614
highpriority · attend · 52EPSS 0.082 · 95 %ileexploit · PoCEURUUSEPSS · scored 2026-10-28
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · high–critical · 7.5–9.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (2)
Public proof-of-concept and weaponised exploit code.
affected products (15)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-5mv2-rx3q-4w2vCode injection in Twig2022-02-10ghsa · osvUS
# Description 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. # Resolution We now disallow calling non Closure in the `sort` filter 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.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (29)
External citations — patches, advisories, analysis.
- https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9cnnvd
- https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5cnnvd
- https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2vcnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/cnnvd
- https://packetstormsecurity.com/files/169251/Debian-Security-Advisory-5107-1.htmlcnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan