CVE-2022-23614

Code injection in Twig

Published Feb 4, 2022 CVSS 3.1 · 8.8 High EPSS 8.2% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-5107-1 php-twig security update
Github GHSA Github GHSA GHSA-5mv2-rx3q-4w2v Code injection in Twig
Ubuntu USN Ubuntu USN USN-5947-1 Twig vulnerabilities
History
Type Values Removed Values Added
Metrics epss

{'score': 0.49674}

epss

{'score': 0.43119}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 23, 2025, 7:08 PM
Reserved
Jan 19, 2022, 12:00 AM
Status
Modified
Published
Feb 4, 2022, 11:15 PM
Modified
Jun 17, 2026, 4:30 AM
Severity
Moderate
Public date
Feb 5, 2022, 12:00 AM