Cyber Resilience

CVE-2022-23614

HighRCE

Published: 04 February 2022

Published
04 February 2022
Modified
21 November 2024
KEV Added
Patch
CVSS Score v3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.2115 95.8th percentile
Risk Priority 30 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2022-23614 is a high-severity Injection (CWE-74) vulnerability in Symfony Twig. Its CVSS base score is 8.8 (High).

Operationally, ranked in the top 4.2% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

Deeper analysis

Twig is an open source PHP template engine that supports a sandbox mode intended to restrict untrusted templates. CVE-2022-23614 is a code-injection flaw in affected versions where the arrow parameter of the sort filter was not properly constrained to accept only closures, contrary to the sandbox contract that applies to similar filters. This allowed injection of arbitrary PHP function calls when an attacker could supply template content or filter arguments.

An authenticated or otherwise low-privileged user able to influence Twig templates processed in sandbox mode could exploit the missing check to execute arbitrary PHP code, resulting in full compromise of confidentiality, integrity, and availability on the host. The vulnerability carries a CVSS 3.1 score of 8.8 with network attack vector and low complexity.

Public advisories and the referenced GitHub security advisory direct users to upgrade to patched Twig releases that now explicitly disallow non-Closure values for the sort filter arrow parameter; the fixes are tracked in commits 22b9dc3 and 2eb3308. Downstream Fedora package announcements also list updated builds for affected distributions.

EPSS for the CVE rose from lower values at disclosure to a peak of 0.4572 in late 2025 before receding to the current 0.2115, indicating a clear post-disclosure increase in observed exploitation interest.

EU & UK References

Vulnerability details

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…

more

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.

CWE(s)

Related Threats

No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.

Affected Assets

symfony
twig
2.0.0 — 2.14.11 · 3.0.0 — 3.3.8
fedoraproject
fedora
34, 35
debian
debian linux
11.0

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-74

Developer assessments and testing (including injection-focused techniques) identify improper neutralization of special elements, and the verifiable flaw remediation corrects them pre-deployment.

addresses: CWE-94

Makes persistent code injection into loaded programs impossible when the executable image itself resides on hardware-protected read-only media.

addresses: CWE-94

Dynamically generated code can be produced and executed inside the isolated chamber, preventing host compromise from code-injection payloads.

addresses: CWE-94

Validates inputs used in dynamic code generation to block injected directives.

addresses: CWE-94

Directly prevents execution of attacker-supplied code written into data memory regions.

addresses: CWE-74

Identifies indicators of injection attacks (command, SQL, LDAP, etc.) via anomaly and attack monitoring.

References