Intel

AIKIDO-2026-917839

craftcms/cms is vulnerable to Remote Code Execution

CVE-2026-72781Published Jul 31, 2026
July 31, 2026

82

CVSS Score

High

Remote Code Execution

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.

How do I fix this?

Upgrade the craftcms/cms library to the patch version.

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.

Versions

4.0.0 - 4.18.2

Fixed in 4.18.3

5.0.0 - 5.10.6

Fixed in 5.10.7

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.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea