Live threats

All CVEs / Symfony

CVE-2022-23614Symfony Twig

Critical 9.8 No auth needed

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
Weakness (CWE)
CWE-74, CWE-94
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Twig.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
symfonytwig≥ 2.0.0 < 2.14.11
symfonytwig≥ 3.0.0 < 3.3.8
fedoraprojectfedora34
fedoraprojectfedora35
debiandebian_linux11.0

Official sources

References

Links published by the sources. Open them with care.