Skip to content
Heist/ feed
Back to feed
CriticalFix available

php-twig — security advisory

Type: advisorySources: OSVAdvisory ID: 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 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.

Products
php-twig
Affected versions
Not specified
Fixed versions
3.3.8-1
CVEs
CVE-2022-23614
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 14:43 UTC · Revision 1

Source evidence

DEBIAN-CVE-2022-23614

core-osv · Original source

Published 4 Feb 2022, 23:15 UTC

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.

osv:DEBIAN-CVE-2022-23614

php-twig

Fixed versions: 3.3.8-1

php-twig

Fixed versions: 3.3.8-1

php-twig

Fixed versions: 3.3.8-1

Complete source record
{
  "id": "fdba91ec5ddd6fb4dcc9460c6a76cd1dd9075de28ff0e1c91fdee3356daa5d05",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-23614",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2022-23614",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2022-23614",
    "products": [
      {
        "name": {
          "value": "php-twig",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.3.8-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "php-twig",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.3.8-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "php-twig",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.3.8-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "DEBIAN-CVE-2022-23614",
      "aliases": [
        "DEBIAN-CVE-2022-23614"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.3.8-1"
                }
              ]
            }
          ],
          "package": {
            "name": "php-twig",
            "purl": "pkg:deb/debian/php-twig?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-23614.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.3.8-1"
                }
              ]
            }
          ],
          "package": {
            "name": "php-twig",
            "purl": "pkg:deb/debian/php-twig?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-23614.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.3.8-1"
                }
              ]
            }
          ],
          "package": {
            "name": "php-twig",
            "purl": "pkg:deb/debian/php-twig?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-23614.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-15T08:01:42.207684428Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-23614"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2022-23614"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-23614",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 323100,
  "published_at": "2022-02-04T23:15:15.727+00:00"
}