Intel

AIKIDO-2026-609326

craftcms/cms is vulnerable to Remote Code Execution (RCE)

Remote Code Execution (RCE)GHSA-xmwr-88vw-5ghh Published Today

82

High Risk

This Affects:

PHPcraftcms/cms
4.17.0 - 4.18.7
Fixed in 4.18.8
5.9.0 - 5.10.14
Fixed in 5.11.0
Are you affected? Scan for Free

TL;DR

Craft CMS's group Twig filter accepts either a string property path or a PHP callable as its arrow argument. On the callable branch the filter invoked the callable directly without calling Twig's CoreExtension::checkArrow(), which is the check that requires a callable to be a Closure when the environment is sandboxed. A sandboxed template could therefore pass a non-Closure callable such as an arbitrary PHP function name to |group and have it invoked, escaping the sandbox and achieving remote code execution in a context meant to be restricted to a safe subset of Twig. The fix adds the checkArrow() call on the callable branch; the string branch was already safe because strings are always interpreted as nested field paths.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and have Craft's Twig sandbox enabled via enableTwigSandbox or render sandboxed object templates that reach the |group filter with a callable argument.

Background info

craftcms/cms is vulnerable to Remote Code Execution (RCE) in versions 4.17.0 - 4.18.7 and 5.9.0 - 5.10.14.

How to fix this

Upgrade the craftcms/cms library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform