Improper Neutralization of Special Elements Used in a Template Engine Affecting craftcms/cms package, versions >=4.0.0-RC1, <4.14.13>=5.0.0-RC1, <5.6.15


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.42% (61st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-CRAFTCMSCMS-10116750
  • published12 May 2025
  • disclosed5 May 2025
  • creditsingetu0096

Introduced: 5 May 2025

NewCVE-2025-46731  (opens in a new tab)
CWE-1336  (opens in a new tab)

How to fix?

Upgrade craftcms/cms to version 4.14.13, 5.6.15 or higher.

Overview

craftcms/cms is a content management system.

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements Used in a Template Engine via the checkArrowFunction in twig/Extension.php. An attacker can execute arbitrary code by exploiting server-side template injection and PHP's popen command.

Note: This is only exploitable if the administrator access is obtained and ALLOW_ADMIN_CHANGES is enabled.

CVSS Base Scores

version 4.0
version 3.1