CVE-2022-23614
Code injection in Twig
Reported by github_m · Published February 4, 2022
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.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| twigphp | Twig | >= 3.0.0, < 3.3.8, >= 2.0.0, < 2.14.11 |
| twigphp | Twig | 3.0.0, 2.0.0 |
| twig | twig | 2.0.0, 3.0.0 |
Timeline
- Feb 4, 2022 CVE Published
- Feb 8, 2022 EPSS Score (30 in total, the first dated here)
- Feb 11, 2022 CVE Updated
- Mar 17, 2026 Security Advisory (2 in total, the first dated here)
- Apr 9, 2026 Distribution Patch
- Jul 4, 2026 Coalition ESS Score
- Nov 13, 2026 PoC Published
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-23614
vulnetix vdb fixes CVE-2022-23614
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-23614/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_MISC
- FEDORA-2022-167b9becef vendor-advisoryx_refsource_FEDORA
- FEDORA-2022-47293b1d23 vendor-advisoryx_refsource_FEDORA
- FEDORA-2022-7d871d7583 vendor-advisoryx_refsource_FEDORA
- FEDORA-2022-58abb323f0 vendor-advisoryx_refsource_FEDORA
- DSA-5107 vendor-advisoryx_refsource_DEBIAN
- https://nvd.nist.gov/vuln/detail/CVE-2022-23614 advisory