/

CVE-2026-109308

Severity:

HIGH RISK

(8.8)

Code Injection (CWE-94) in Craft CMS Update Handler

CVE-2026-109308

Awaiting Analysis

Vulnerability type

Category:

Code 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 passes a raw updates request parameter to its update-processing model without first cleansing the configuration. An authenticated control panel user with update-related privileges may inject behavior or event-handler definitions, potentially causing arbitrary code execution when the request is processed.

Craft CMS passes a raw updates request parameter to its update-processing model without first cleansing the configuration. An authenticated control panel user with update-related privileges may inject behavior or event-handler definitions, potentially causing arbitrary code execution when the request is processed.

Affected context

The issue occurs in Craft CMS control-panel update functionality when the application processes user-supplied updates data without applying the expected configuration-sanitization routine. Exploitation depends on an authenticated user having the performUpdates permission or access to the Updates utility, and on the affected request path accepting attacker-controlled behavior or event-handler configuration.

The issue occurs in Craft CMS control-panel update functionality when the application processes user-supplied updates data without applying the expected configuration-sanitization routine. Exploitation depends on an authenticated user having the performUpdates permission or access to the Updates utility, and on the affected request path accepting attacker-controlled behavior or event-handler configuration.

Exploit preconditions

  • Attack surface: Craft CMS control-panel update functionality
  • Required access: An authenticated control-panel account with performUpdates permission or Updates-utility access
  • Trigger point: Processing of the updates request parameter by AppController::actionCacheUpdates and UpdatesModel
  • Why exploitation is possible: Raw request data is passed into update handling without Component::cleanseConfig(), allowing injected behavior or event-handler definitions to be interpreted as executable application configuration
  • Attack surface: Craft CMS control-panel update functionality
  • Required access: An authenticated control-panel account with performUpdates permission or Updates-utility access
  • Trigger point: Processing of the updates request parameter by AppController::actionCacheUpdates and UpdatesModel
  • Why exploitation is possible: Raw request data is passed into update handling without Component::cleanseConfig(), allowing injected behavior or event-handler definitions to be interpreted as executable application configuration

Why this happens

The underlying flaw is failure to treat request-controlled configuration as untrusted data before passing it to a component that supports behaviors and event handlers. By omitting the configuration-cleansing step, the application can interpret attacker-supplied keys such as as or on as dynamic component configuration rather than inert input. This maps to CWE-94: Improper Control of Generation of Code, because attacker-influenced configuration can alter runtime behavior and enable code execution.

The underlying flaw is failure to treat request-controlled configuration as untrusted data before passing it to a component that supports behaviors and event handlers. By omitting the configuration-cleansing step, the application can interpret attacker-supplied keys such as as or on as dynamic component configuration rather than inert input. This maps to CWE-94: Improper Control of Generation of Code, because attacker-influenced configuration can alter runtime behavior and enable code execution.

Potential impact

  • An attacker may execute arbitrary code in the Craft CMS process context.
  • The attacker could access or modify application data and configuration.
  • The compromise could enable persistence within the CMS environment.
  • The attacker may use the application context to affect connected services or other hosted sites.
  • An attacker may execute arbitrary code in the Craft CMS process context.
  • The attacker could access or modify application data and configuration.
  • The compromise could enable persistence within the CMS environment.
  • The attacker may use the application context to affect connected services or other hosted sites.

General mitigation guidance

Mitigation generally focuses on preventing request data from being interpreted as executable component configuration.

Common defensive patterns include:

  • Applying configuration cleansing and strict allowlisting before dynamic component initialization.
  • Accepting only documented update fields and rejecting behavior or event-handler keys from external input.
  • Separating user-controlled request data from internal component definitions.
  • Enforcing least privilege for control-panel accounts and limiting access to update utilities.
  • Applying authorization checks at every update-processing boundary and using secure-by-default administrative policies.
  • Monitoring and restricting administrative access paths, especially where CMS processes have broad filesystem or service permissions.

Mitigation generally focuses on preventing request data from being interpreted as executable component configuration.

Common defensive patterns include:

  • Applying configuration cleansing and strict allowlisting before dynamic component initialization.
  • Accepting only documented update fields and rejecting behavior or event-handler keys from external input.
  • Separating user-controlled request data from internal component definitions.
  • Enforcing least privilege for control-panel accounts and limiting access to update utilities.
  • Applying authorization checks at every update-processing boundary and using secure-by-default administrative policies.
  • Monitoring and restricting administrative access paths, especially where CMS processes have broad filesystem or service permissions.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that identify raw request parameters flowing into component, behavior, event, or callback configuration.
  • Code review checks for missing cleansing, schema validation, or allowlisting before dynamic object initialization.
  • Tests that submit unexpected configuration keys and verify they are rejected or treated as inert data.
  • Policy enforcement that prohibits user-controlled values from defining runtime handlers or executable component metadata.
  • Logging and alerting for unusual update-utility access, unexpected updates parameter structures, or administrative actions outside normal maintenance windows.
  • Automated security review tools that flag tainted data reaching dynamic configuration APIs.

Organizations can look for this weakness through:

  • Static analysis rules that identify raw request parameters flowing into component, behavior, event, or callback configuration.
  • Code review checks for missing cleansing, schema validation, or allowlisting before dynamic object initialization.
  • Tests that submit unexpected configuration keys and verify they are rejected or treated as inert data.
  • Policy enforcement that prohibits user-controlled values from defining runtime handlers or executable component metadata.
  • Logging and alerting for unusual update-utility access, unexpected updates parameter structures, or administrative actions outside normal maintenance windows.
  • Automated security review tools that flag tainted data reaching dynamic configuration APIs.

Sources

SourceLink
github.comgithub.com/craftcms/cms/security/advisories/GHSA-5m2g-hhqr-84pc
vulncheck.comvulncheck.com/advisories/craft-cms-4.0.0-before-4.18.7-and-5.0.0-before-5.10.14-rce-via-actioncacheupdates-behavior-injection

Frequently asked

questions

It may be exploitable through the Craft CMS control panel, but exploitation requires authenticated access with the necessary update-related permission or utility access.

No. The relevant account must have the performUpdates permission or access to the Updates utility, depending on deployment configuration and authorization controls.

Ensure request-controlled update data is strictly schema-validated, allowlisted, and cleansed before it reaches component configuration or dynamic behavior handling. External input should not be able to define event handlers or executable behaviors.

Separate trusted component definitions from request data, enforce least privilege for administrative users, add taint-flow tests and static analysis, and monitor sensitive control-panel update operations.

It may be exploitable through the Craft CMS control panel, but exploitation requires authenticated access with the necessary update-related permission or utility access.

No. The relevant account must have the performUpdates permission or access to the Updates utility, depending on deployment configuration and authorization controls.

Ensure request-controlled update data is strictly schema-validated, allowlisted, and cleansed before it reaches component configuration or dynamic behavior handling. External input should not be able to define event handlers or executable behaviors.

Separate trusted component definitions from request data, enforce least privilege for administrative users, add taint-flow tests and static analysis, and monitor sensitive control-panel update operations.

Find out what's already
exploitable in your codebase.