Craft CMS Vulnerable to Stored XSS via User Group Name in User Permissions Page
Impact
A stored XSS vulnerability exists in the User Permissions page. The User Group name is rendered without proper HTML escaping in the permissions section, allowing an attacker to execute arbitrary JavaScript when another user views or edits a user's permissions.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 5.0.0-RC1 before 5.8.22Ecosystem versions | 5.8.22 |
Version evidence: OSV · GHSA-g3hp-vvqf-8vw6
View original version evidence (143 explicit versions)
Original source description
Summary
A stored XSS vulnerability exists in the User Permissions page. The User Group name is rendered without proper HTML escaping in the permissions section, allowing an attacker to execute arbitrary JavaScript when another user views or edits a user's permissions.
[!NOTE] This is a separate vulnerability from the previously reported "Stored XSS via User Group Name in User Settings Page" and "Multiple Stored XSS in User Group Edit Page". This affects a different sink: the individual user's permissions page.
Proof of Concept
Required Permissions
- Admin access
allowAdminChangesis enabled in production, which is against our security recommendations.
Steps to Reproduce
- Log in to the control panel as an admin
- Navigate to Settings → Users → User Groups
- Create or edit a user group and set the Name field to:
<img src=x onerror="alert('XSS')" hidden> - Save the user group
- Navigate to Users and edit any user (
/admin/users/{id}) - Click on the Permissions tab
- XSS executes
Mitigation
Sanitize user group names when rendering in the user permissions template.
References
References
- Security advisory github.com/craftcms/cms/security/advisories/GHSA-g3hp-vvqf-8vw6
- Security advisory nvd.nist.gov/vuln/detail/CVE-2026-56381
- Source reference github.com/craftcms/cms
- Release notes github.com/craftcms/cms/releases/tag/5.8.22
- Security advisory www.vulncheck.com/advisories/craft-cms-stored-xss-via-user-group-name-in-user-permissions-page