Skip to main content

CVE-2026-32267 — Vulnerability in craftcms/cms — CVE Details

HIGH

Craft CMS Vulnerable to Privilege Escalation/Bypass through UsersController->actionImpersonateWithToken()

Published March 16, 2026Updated March 17, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.57%). Schedule for your next planned update.

Does your project use an affected craftcms/cms version?

Paste your composer.lock to check it for CVE-2026-32267 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

Summary

Summary

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:

  1. The action re-dispatch in actionPreview() passes $skipSpecialHandling=true to handleRequest(), bypassing all security guards, and passes $checkToken=false to checkIfActionRequest(), which allows an attacker-controlled action query parameter to override the dispatch target.
  2. The requireToken() guard on actionImpersonateWithToken() 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.
  3. actionImpersonateWithToken is listed in $allowAnonymous and performs no authorization beyond requireToken(), 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:

  1. Log in at http://host:18895/admin
  2. Go to Settings,  Sections, New Section (name: "Blog", type: "Channel")
  3. Under Site Settings, set URI Format to blog/{slug}
  4. Then go to Entries, New Entry, Blog, and give it any title

Next, obtain a preview token

  1. Open the saved entry in the editor
  2. Click the Preview button
  3. A preview pane opens with the entry rendered in an iframe
  4. Right-click inside the preview pane and Inspect Element
  5. Find the element; its src contains the tokenized URL: http://host:18895/blog/title?x-craft-live-preview=...&token=XXXXXXXX
  6. Copy the token= value

Finally, execute the exploit:

  1. Open a new incognito/private browser window   2. Navigate to: http://host:18895/?token=XXXXXXXX&action=users/impersonate-with-token&userId=1&prevUserId=1   3. You may see a 404. This is expected.

To verify the exploit, in the same incognito tab, navigate to http://host:18895/admin. You should land on the admin dashboard, logged in as admin, without ever entering credentials.

Impact

Privilege escalation; everyone is impacted.

Advisory Timeline

  • First published March 16, 2026 (255 days ago).
  • Last revised March 17, 2026 — 1 day after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update craftcms/cms to 4.17.6 or later
composer require "craftcms/cms:^4.17.6"
Composer
Update craftcms/cms to 5.9.12 or later
composer require "craftcms/cms:^5.9.12"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Packagist (1).

PackageFixed In
craftcms/cms Packagist · Affected: 4.0.0, 4.0.0-RC1, 4.0.0-RC2, 4.0.0-RC3 (+233 more)4.17.6
craftcms/cms Packagist · Affected: 5.0.0, 5.0.0-RC1, 5.0.1, 5.0.2 (+155 more)5.9.12

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-863
    Incorrect AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.4 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-32267?
Craft CMS Vulnerable to Privilege Escalation/Bypass through UsersController->actionImpersonateWithToken(). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.4/10).
How do I check if my project is affected by CVE-2026-32267?
CVE-2026-32267 affects craftcms/cms. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-32267 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.4

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.57%
EPSS percentile: 40.7

This is a below-median EPSS score — only 40.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-cc7p-2j3x-x7xf

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock