CVE-2022-23614Symfony Twig
Critical 9.8 No auth needed
Follow: this CVE · Symfony · Symfony Twig We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 6.6% probability of exploitation in 30 days · percentile 95
- Auth required
- No
- Published
- Feb 4, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Twig.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | twig/twig |
≥ 2.0.0 < 2.14.11 |
2.14.11 |
composer require "twig/twig:^2.14.11" |
| Packagist | twig/twig |
≥ 3.0.0 < 3.3.8 |
3.3.8 |
composer require "twig/twig:^3.3.8" |
Per OSV / GitHub Advisories (GHSA-5mv2-rx3q-4w2v). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| symfony | twig | ≥ 2.0.0 < 2.14.11 |
| symfony | twig | ≥ 3.0.0 < 3.3.8 |
| fedoraproject | fedora | 34 |
| fedoraproject | fedora | 35 |
| debian | debian_linux | 11.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- www.debian.org Third Party Advisory