Summary
Craft CMS Vulnerable to Privilege Escalation/Bypass through UsersController->actionImpersonateWithToken()
A low-privilege user (or an unauthenticated user who has been sent a shared URL) can escalate their privileges to admin by abusing UsersController->actionImpersonateWithToken.
Affected users should update to Craft 4.17.6 and 5.9.12 to mitigate the issue.
Details
This vulnerability allows any low-privilege user to escalate their privileges and become an admin, or, in extreme circumstances, unprivileged users to do the same.
Therefore, this vulnerability affects Craft Pro and Team more than Craft Solo.
Specifically, an attacker who possesses a valid “preview token” can then append &action=users/impersonate-with-token&userId=1&prevUserId=1 to the preview URL to hijack the request into the impersonation endpoint, logging in as any user (including admin) without authentication. Getting the preview token is easy, and all an editor would have to do is create a single article, click “Preview”, and then recover this token.
Here’s what happens:
- The action re-dispatch in
actionPreview()passes$skipSpecialHandling=truetohandleRequest(), bypassing all security guards, and passes$checkToken=falsetocheckIfActionRequest(), which allows an attacker-controlled action query parameter to override the dispatch target. - The
requireToken()guard onactionImpersonateWithToken()only checks a boolean (_hadToken) that was set when the preview token was initially resolved. It does not verify that the token was intended for the impersonation action, and so any valid token from any route satisfies the check. actionImpersonateWithTokenis listed in$allowAnonymousand performs no authorization beyondrequireToken(), so no prior authentication is required.
PoC
The PoC achieves full admin takeover on the latest Craft CMS 5.9.10. Spawn a local version of Craft. Then, you’ll want to log in and create a valid setup:
- Log in at http://host:18895/admin
- Go to Settings, Sections, New Section (name: "Blog", type: "Channel")
- Under Site Settings, set URI Format to blog/{slug}
- Then go to Entries, New Entry, Blog, and give it any title
Next, obtain a preview token
- Open the saved entry in the editor
- Click the Preview button
- A preview pane opens with the entry rendered in an iframe
- Right-click inside the preview pane and Inspect Element
- Find the
Impact
Privilege escalation; everyone is impacted.
The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
craftcms/cms to 4.17.6 or later; craftcms/cms to 5.9.12 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-32267? CVE-2026-32267 is a high-severity incorrect authorization vulnerability in craftcms/cms (composer), affecting versions >= 4.0.0-RC1, <= 4.17.5. It is fixed in 4.17.6, 5.9.12. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
- Which versions of craftcms/cms are affected by CVE-2026-32267? craftcms/cms (composer) versions >= 4.0.0-RC1, <= 4.17.5 is affected.
- Is there a fix for CVE-2026-32267? Yes. CVE-2026-32267 is fixed in 4.17.6, 5.9.12. Upgrade to this version or later.
- Is CVE-2026-32267 exploitable, and should I be worried? Whether CVE-2026-32267 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-32267 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-32267?
- Upgrade
craftcms/cmsto 4.17.6 or later - Upgrade
craftcms/cmsto 5.9.12 or later
- Upgrade