/

CVE-2026-92593

Severity:

HIGH RISK

(8.8)

Server-Side Template Injection (CWE-94) in Craft CMS

CVE-2026-92593

Awaiting Analysis

Vulnerability type

Category:

Server-Side Template Injection

CWE:

CWE-94

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Craft CMS contains an incomplete protection boundary that allows an authenticated, low-privilege control panel user with limited edit permissions to reach an unsandboxed Twig rendering path. Under the affected configuration and request flow, attacker-controlled template content may be processed as PHP, potentially resulting in arbitrary code execution and full server compromise.

Affected context

The vulnerability occurs in Craft CMS control panel request handling when a user can edit at least one supported element type and influence a redirect-related parameter. A token-generation behavior that does not bind HMAC values to parameter names can allow a token created for one parameter to be replayed in another request context, reaching an unsandboxed object-template rendering sink. Exploitability depends on authenticated control panel access, applicable permissions, and the vulnerable request flow being available.

Exploit preconditions

  • Attack surface: Authenticated Craft CMS control panel functionality
  • Required access: A low-privilege control panel account with edit rights for at least one element type
  • Trigger point: Processing of a crafted redirect POST parameter that reaches object-template rendering
  • Why exploitation is possible: HMAC tokens are not sufficiently bound to parameter names, while the reached rendering sink remains unsandboxed and can process attacker-controlled template content

Why this happens

The issue combines incomplete remediation of a server-side template injection path with inadequate binding of security tokens to their intended request parameters. A token accepted across parameter contexts can be replayed to reach a rendering operation that interprets attacker-influenced Twig as executable template logic. When template rendering is not sandboxed or strictly constrained, this behavior maps to CWE-94: Improper Control of Generation of Code, because data supplied through an authenticated application workflow can influence code-generating or code-executing behavior.

Potential impact

  • An attacker may execute arbitrary PHP code on the application server
  • The attacker could access, alter, or delete application and customer data
  • Server credentials and configuration secrets may be exposed
  • The application could be used to access connected services or internal systems
  • A successful compromise can lead to full server takeover

General mitigation guidance

Mitigation generally focuses on removing attacker influence from executable template contexts and strengthening the relationship between authorization tokens and request parameters.

Common defensive patterns include:

  • Avoiding server-side evaluation of user-controlled templates or expressions
  • Using sandboxed, allowlisted template rendering with dangerous operations disabled
  • Binding integrity tokens to the exact parameter name, request purpose, session, and relevant context
  • Applying authorization checks at the final rendering sink rather than relying only on earlier workflow permissions
  • Restricting control panel privileges and separating content-editing permissions from administrative capabilities
  • Treating redirect targets and other navigation parameters as untrusted, with strict parsing and allowlisting
  • Keeping application secrets and server processes protected through least-privilege deployment controls

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules identifying template rendering APIs that receive request-derived or persisted content
  • Code review checks for token validation that omits parameter names, purposes, or request context
  • Searches for unsandboxed Twig or equivalent template evaluation reachable from control panel routes
  • Dynamic testing of authorization boundaries and parameter substitution across authenticated workflows
  • Web application monitoring for unusual control panel requests, repeated token reuse, unexpected redirect parameters, or template-engine errors
  • Policy enforcement requiring allowlisted templates and security-token context binding before deployment

Sources

SourceLink
github.comgithub.com/craftcms/cms/security/advisories/GHSA-5jmw-g85v-7jv2
vulncheck.comvulncheck.com/advisories/craft-cms-5.10.0-before-5.10.13-authenticated-remote-code-execution

Frequently asked

questions

It can be exploited through the Craft CMS control panel when the attacker has the required authenticated account and permissions. It does not generally represent an unauthenticated attack path.

The described scenario requires a low-privilege control panel user with edit rights for at least one element type. The exact reachability depends on enabled features, authorization rules, and deployment configuration.

Prevent user-controlled content from reaching executable template contexts, enforce strict sandboxing and allowlists, and bind integrity tokens to their precise parameter and request purpose.

Review all template-rendering sinks, test authorization boundaries with realistic low-privilege accounts, require context-bound token validation, and monitor control panel activity for anomalous parameter and token use.

Find out what's already
exploitable in your codebase.