Skip to content
Heist/ feed
High

Low privilege condition filter escapes Twig sandbox, recovers "securityKey" and reaches RCE

Type: advisorySource: Official CVE List1 source record

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.

Announced Group revision 1
Original source ↗

CVE-2026-115938

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-115938

cms

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "craftcms",
    "product": "cms",
    "versions": [
      {
        "status": "affected",
        "version": "5.0.0",
        "lessThan": "5.11.2",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "4.0.0",
        "lessThan": "4.18.9",
        "versionType": "semver"
      }
    ],
    "packageName": "craftcms/cms",
    "collectionURL": "https://packagist.org",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-115938

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#53323 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement