ADVISORIES

Vulnerability

CVE-2022-23614

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.

5 advisories report this vulnerability, across 3 ecosystems.

High severity All Debian 2Ubuntu 2Packagist 1

Advisories

  • DEBIAN-CVE-2022-23614

    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…

    CVE-2022-23614 Debian Updated 20 November 2026
  • DSA-5107-1

    php-twig - security update

    CVE-2022-23614 Debian Updated 20 November 2026
  • GHSA-5mv2-rx3q-4w2v

    Code injection in Twig

    High CVE-2022-23614 Packagist Updated 16 February 2024
  • UBUNTU-CVE-2022-23614

    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…

    CVE-2022-23614 Ubuntu Updated 4 February 2026
  • USN-5947-1

    php-twig, twig vulnerabilities

    CVE-2019-9942CVE-2022-23614CVE-2022-39261 Ubuntu Updated 25 June 2026

References