CVE-2022-23614
PHP vulnerability analysis and mitigation

Overview

CVE-2022-23614 affects Twig, an open source template language for PHP. The vulnerability was discovered in the sandbox mode functionality where the arrow parameter of the sort filter was not properly enforcing closure constraints, potentially allowing attackers to execute arbitrary PHP code. The issue was disclosed on February 4, 2022, affecting versions >2.0.0,<2.14.11 and >3.0.0,<3.3.8 (GitHub Advisory).

Technical details

The vulnerability exists in Twig's sandbox mode implementation where the sort filter's arrow parameter was not properly enforcing the requirement for closure-type inputs. In affected versions, this constraint was not properly enforced, allowing non-closure inputs that could lead to arbitrary PHP code execution. The issue was fixed by implementing proper validation that disallows calling non-Closure functions in the sort filter, similar to existing constraints on other filters (CVE Mitre).

Impact

When exploited, this vulnerability could allow attackers to execute arbitrary PHP code through the template engine, effectively bypassing the sandbox security measures that are designed to evaluate untrusted template code safely (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Twig versions 2.14.11 and 3.3.8. Users are advised to upgrade to these or later versions. The fix implements proper validation that disallows calling non-Closure functions in the sort filter when in sandbox mode (GitHub Advisory, Ubuntu Security).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67510CRITICAL9.4
  • PHPPHP
  • neuron-core/neuron-ai
NoYesDec 10, 2025
CVE-2024-58303HIGH8.6
  • PHPPHP
  • fof/pretty-mail
NoNoDec 11, 2025
CVE-2025-67719HIGH8.5
  • PHPPHP
  • ibexa/user
NoYesDec 11, 2025
CVE-2025-67648HIGH7.1
  • PHPPHP
  • shopware/shopware
NoYesDec 11, 2025
CVE-2025-67737LOW3.1
  • PHPPHP
  • azuracast/azuracast
NoYesDec 12, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management