In short
- CVE-2026-25491 is a MEDIUM (CVSS 4.8) vulnerability affecting craftcms/cms, craft cms (craftcms).
- Chance of exploitation in the next 30 days (EPSS): 0.36%, higher than 29.6% of all vulnerabilities.
- Fix: update to 5.8.22, 5.8.21 or later.
| Package | Affected versions | Patched versions |
|---|
| craftcms/cms Packagist | ≥ 5.0.0-RC1, < 5.8.22
| 5.8.22
|
| craft cms | ≥ 5.0.0, < 5.8.21
| 5.8.21
|
Description
Summary
Stored XSS via Entry Type names. The name is not sanitized when displayed in the Entry Types list.
Proof of Concept
Required Permissions (Attacker)
- Admin access (only admins have access to the settings page)
allowAdminChanges is enabled in production, which is against our security recommendations.
Steps to Reproduce
- Log in as an attacker.
- Go to Settings -> Entry Types (
/admin/settings/entry-types).
- Create a new Entry Type.
- Set Name to:
<img src=x onerror="alert('XSS-EntryTypes')" hidden>
- Save the Entry Type, and you’ll be redirected back to the entry types table automatically.
- Notice the alert fires when the entry types table renders.
NVD description
Craft is a platform for creating digital experiences. From 5.0.0-RC1 to 5.8.21, Craft has a stored XSS via Entry Type names. The name is not sanitized when displayed in the Entry Types list. This vulnerability is fixed in 5.8.22.
More vulnerabilities in craftcms/cms
See all →Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free