{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-115938",
        "assignerOrgId": "7004884b-51e2-48e8-b4a2-5ca29e80453e",
        "state": "PUBLISHED",
        "assignerShortName": "Hackrate",
        "dateReserved": "2026-10-23T21:25:32.945Z",
        "datePublished": "2026-10-23T21:58:51.816Z",
        "dateUpdated": "2026-10-23T21:58:51.816Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "7004884b-51e2-48e8-b4a2-5ca29e80453e",
                "shortName": "Hackrate",
                "dateUpdated": "2026-10-23T21:58:51.816Z"
            },
            "title": "Low privilege condition filter escapes Twig sandbox, recovers \"securityKey\" and reaches RCE",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-1336",
                            "description": "CWE-1336 Improper neutralization of special elements used in a template engine",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "vendor": "craftcms",
                    "product": "cms",
                    "collectionURL": "https://packagist.org",
                    "packageName": "craftcms/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"
                        }
                    ],
                    "defaultStatus": "unaffected"
                }
            ],
            "cpeApplicability": [
                {
                    "operator": "OR",
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:a:craftcms:cms:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.0.0",
                                    "versionEndExcluding": "5.11.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:a:craftcms:cms:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.0.0",
                                    "versionEndExcluding": "4.18.9"
                                }
                            ]
                        }
                    ]
                }
            ],
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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.\n\n\n\nThe 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.\n\n\n\nAfter 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.",
                    "supportingMedia": [
                        {
                            "type": "text/html",
                            "base64": false,
                            "value": "<p>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&nbsp;<code>column</code>&nbsp;filter delegates property lookup to Yii&nbsp;<code>ArrayHelper</code>, outside Twig’s&nbsp;<code>SecurityPolicy</code>. Repeated single-segment lookups therefore bypass the sandbox’s empty property/method allowlists.</p><p>The vulnerable condition value is ultimately cast to an integer. That does not protect the secret: the template can return author ID&nbsp;<code>1</code>&nbsp;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.</p><p>After recovering&nbsp;<code>GeneralConfig::securityKey</code>, the same user can compute Craft’s generic HMAC wire format offline. Signed parameters such as&nbsp;<code>redirect</code>&nbsp;are then accepted and passed to unsandboxed&nbsp;<code>View::renderObjectTemplate()</code>, where Twig’s string-callable form can invoke native PHP callables. The regression proof uses the harmless&nbsp;<code>substr()</code>&nbsp;callback and observes&nbsp;<code>abcdef</code>&nbsp;becoming&nbsp;<code>cdef</code>; it does not execute an OS command.</p>"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://www.hckrt.com/hacktivity/HCKRT-DRNL9W",
                    "tags": [
                        "third-party-advisory",
                        "technical-description",
                        "mitigation"
                    ]
                },
                {
                    "url": "https://github.com/craftcms/cms/releases/tag/5.11.2",
                    "tags": [
                        "release-notes"
                    ]
                },
                {
                    "url": "https://github.com/craftcms/cms",
                    "tags": [
                        "product"
                    ]
                },
                {
                    "url": "https://github.com/craftcms/cms/security/advisories/GHSA-v4q3-2g5g-wjj6",
                    "tags": [
                        "third-party-advisory"
                    ]
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ],
                    "cvssV4_0": {
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "attackRequirements": "NONE",
                        "privilegesRequired": "LOW",
                        "userInteraction": "NONE",
                        "vulnConfidentialityImpact": "HIGH",
                        "subConfidentialityImpact": "NONE",
                        "vulnIntegrityImpact": "HIGH",
                        "subIntegrityImpact": "NONE",
                        "vulnAvailabilityImpact": "HIGH",
                        "subAvailabilityImpact": "NONE",
                        "exploitMaturity": "NOT_DEFINED",
                        "Safety": "NOT_DEFINED",
                        "Automatable": "NOT_DEFINED",
                        "Recovery": "NOT_DEFINED",
                        "valueDensity": "NOT_DEFINED",
                        "vulnerabilityResponseEffort": "NOT_DEFINED",
                        "providerUrgency": "NOT_DEFINED",
                        "version": "4.0",
                        "baseSeverity": "HIGH",
                        "baseScore": 8.7,
                        "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
                    }
                },
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ],
                    "cvssV3_1": {
                        "version": "3.1",
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "privilegesRequired": "LOW",
                        "userInteraction": "NONE",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "availabilityImpact": "HIGH",
                        "baseSeverity": "HIGH",
                        "baseScore": 8.8,
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
                    }
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Mohamed Wagdy (@Kalawy)",
                    "type": "reporter"
                },
                {
                    "lang": "en",
                    "value": "Hackrate",
                    "type": "coordinator"
                }
            ],
            "source": {
                "advisory": "GHSA-v4q3-2g5g-wjj6",
                "discovery": "UNKNOWN"
            },
            "x_generator": {
                "engine": "Vulnogram 1.0.4"
            }
        }
    }
}