Skip to content
Threat Feed
high advisory

Craft CMS Twig Sandbox Bypass (CVE-2026-109305)

Craft CMS versions 5.10.2 through 5.10.13 contain a Twig sandbox bypass vulnerability allowing non-admin users with System Messages permissions to execute arbitrary PHP code.

CVE search metadata

CVE search record: CVE-2026-109305. Severity: high. CVSS: 8.8. KEV: no. Product: Craft CMS (5.10.2 - 5.10.13), Craft CMS (4.0.0-4.18.6), Craft CMS (5.0.0-5.10.13). Brief: Craft CMS Twig Sandbox Bypass (CVE-2026-109305). Brief link: https://feed.craftedsignal.io/briefs/2026-10-twig-bypass/

What's new

  • 1. added coverage for Craft CMS (4.0.0-4.18.6) +1 products Oct 12, 18:34 via nvd

Craft CMS versions 5.10.2 through 5.10.13 are vulnerable to a Twig sandbox bypass caused by improper validation of the "has some" and "has every" operators. This vulnerability allows an authenticated attacker possessing the "System Messages" permission to bypass the Twig sandbox environment and invoke arbitrary PHP callables. By providing specifically crafted two-argument callables such as 'system' or 'passthru' within sandboxed template fields, an attacker can achieve remote code execution (RCE) in the context of the web server process. This vulnerability is highly critical due to the ease of exploitation by authenticated users with limited privileges, potentially leading to full compromise of the underlying web application environment.

Impact

Successful exploitation allows for unauthorized code execution on the web server, which can lead to data exfiltration, system-wide compromise, and lateral movement within the hosting infrastructure. The vulnerability affects all Craft CMS installations within the specified version range.

Recommendation

Prioritized, concrete actions for detection engineering teams:

  • Patch Craft CMS to version 5.10.14 or later immediately.
  • Audit all user accounts possessing the "System Messages" permission to identify and minimize accounts with excessive privileges.
  • Review web server logs for suspicious POST requests containing Twig-related keywords or system command patterns (e.g., system, passthru, exec) submitted via template editing interfaces.
  • Implement stricter access controls and monitor template modification activities within the administrative interface.

Immediate actions

Upgrade Craft CMS to 5.10.14 or later

IT Operations 24h

Mitigations

Revoke System Messages permissions from non-authorized users

immediate IT Operations

CVE-2026-109305