CVE-2022-23614Code injection in Twig
- 8.8HighCVSS base score
- 8.2%Exploitation in 30 daysEPSS · top 5.0% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 16 days later
· 16 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 8.2% · top 5.0% of all CVEs (12 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.8.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagisttwig/twigGHSA-5mv2-rx3q-4w2v (opens in a new tab)
References
References8
- https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5 (opens in a new tab)x_refsource_MISCx_transferred
- FEDORA-2022-167b9becef (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2022-47293b1d23 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2022-7d871d7583 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- FEDORA-2022-58abb323f0 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- DSA-5107 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-0842 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-5mv2-rx3q-4w2v (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-23614)Record last updated .