---
id: "CVE-2026-115938"
kind: "vulnerability"
aliases: ["CVE-2026-115938"]
title: "Craft CMS: control panel users can leak the security key and run PHP"
severity: "high"
cvss: 8.8
epss: 0.00682
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["craft-cms", "package", "php", "self-hosted"]
not_affected_if: ["auth-required", "no-untrusted-cp-users"]
published_at: "2026-10-23T22:16:59+00:00"
first_seen_at: "2026-10-23T23:44:51+00:00"
updated_at: "2026-10-25T12:38:49+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115938", "first_seen_at": "2026-10-23T23:44:51+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-115938", "first_seen_at": "2026-10-25T12:38:49+00:00"}]
---

# Craft CMS: control panel users can leak the security key and run PHP

Any authenticated control panel user can abuse an element-search filter, evaluated as a Twig template, to recover Craft CMS's secret security key one character at a time. With that key they can forge signed requests that reach an unsandboxed template renderer, which can invoke native PHP callables.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Craft CMS version with `composer show craftcms/cms` and compare it against the fixed release in the sources.
- Confirm whether any non-admin control panel users exist that could reach element search.

## Fix

- Upgrade Craft CMS to the patched release listed by the vendor (version unknown from the sources).
- Rotate `GeneralConfig::securityKey` after upgrading, since it may have been exposed.

## Timeline

- 2026-10-23T23:44:51+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115938
- 2026-10-25T12:38:49+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-115938

## From the sources

Craft CMS allows any authenticated control panel user to submit an element-search condition whose element selector is evaluated as a sandboxed Twig object template. Craft’s allowed column filter delegates property lookup to Yii ArrayHelper, outside Twig’s SecurityPolicy. Repeated single-segment lookups therefore bypass the sandbox’s empty property/method allowlists.



The vulnerable condition value is ultimately cast to an integer. That does not protect the secret: the template can return author ID 1 when a guessed key character is correct and an impossible ID otherwise. The JSON endpoint returns entries for the first case and an empty array for the second, forming a stable remote character oracle.



After recovering GeneralConfig::securityKey, the same user can compute Craft’s generic HMAC wire format offline. Signed parameters such as redirect are then accepted and passed to unsandboxed View::renderObjectTemplate(), where Twig’s string-callable form can invoke native PHP callables. The regression proof uses the harmless substr() callback and observes abcdef becoming cdef; it does not execute an OS command.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
