GHSA-R56R-F696-C8W9
Control panel only administrator privilege escalation through sandbox allowed "getOwners(criteria)"
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-R56R-F696-C8W9 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Craft exposes `NestedElementInterface::getOwners(array $criteria)` to sandboxed Twig through `#[AllowedInSandbox]`. Its implementation applies the caller’s array directly to an `ElementQuery` with `Craft::configure()` and then executes the query. Unlike the controllers’ direct query paths, it applies neither `Component::cleanseConfig()` nor `ElementHelper::cleanseQueryCriteria()`.
An authenticated control panel user can reach this method from the relational-condition object template feature. The attacker supplies a nested reference element and a sandboxed template that calls `object.getOwners()`. Yii treats `as <name>` and `on <event>` keys specially when `Craft::configure()` assigns them, allowing the attacker to attach a `yii\behaviors\AttributeTypecastBehavior` to the owner query and register a wildcard event handler. `ElementQuery::all()` fires a query event and invokes the attacker-selected typecast callback.
The production-safe proof selected Craft’s own `craft\helpers\FileHelper::createDirectory()` as the callback. The endpoint created an attacker-selected directory anywhere writable by the PHP worker, confirming arbitrary selection and invocation of a production-bundled PHP callable.
The same primitive has a direct, production-bundled administrator-escalation sink: `craft\records\User::updateAll(['admin' => true])`. Craft’s User record inherits Yii’s public static `updateAll($attributes, $condition = '', ...)`; the omitted condition updates every row in `{{%users}}`.
Impact
The attacker can select and invoke public static PHP callables that accept the attacker-controlled value. Most importantly, `craft\records\User::updateAll(['admin' => true])` promotes every account in the Craft users table, including the attacker’s account.
Report ID: 1897
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistcraftcms/cms |
Corregida | 5.11.2 | — | — |
5.11.2Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/craftcms/cms/security/advisories/GHSA-r56r-f696-c8w9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
