Intel

AIKIDO-2026-917839

craftcms/cms is vulnerable to Remote Code Execution

Remote Code ExecutionGHSA-f5wm-88jv-g5hx Published 2 days ago

82

High Risk

This Affects:

PHPcraftcms/cms
4.0.0 - 4.18.2
Fixed in 4.18.3
5.0.0 - 5.10.6
Fixed in 5.10.7
Are you affected? Scan for Free

TL;DR

Craft CMS's Twig sandbox allowlists whole classes, and marking the element interface as allowed transitively permits methods from base classes up the hierarchy, reaching a Yii component gadget. That gadget exposes an arbitrary function-call primitive that remains callable from sandboxed templates. An authenticated control-panel user can render a crafted Twig template and achieve remote code execution even when the sandbox is enabled. The fix constrains the allowlist so the dangerous gadget is no longer reachable.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and authenticated control-panel users can render Twig templates under the sandbox.

Background info

craftcms/cms is vulnerable to Remote Code Execution in versions 4.0.0 - 4.18.2 and 5.0.0 - 5.10.6.

How to fix this

Upgrade the craftcms/cms library to the patch version.