CVE-2026-56381: Craftcms/cms Cross-Site Scripting Vulnerability

LOW
Advisory Identifier: GHSA-g3hp-vvqf-8vw6
CWE-79
Published
Advisory Summary

CVE-2026-56381 is a LOW cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Craftcms/cms libraries in the Packagist ecosystem. The issue involves craft cms vulnerable to stored xss via user group name in user permissions page. Remediation is available by upgrading affected packages to version 5.8.22.

CVE-2026-56381 at a Glance

CVE Identifier CVE-2026-56381
GHSA Identifier GHSA-g3hp-vvqf-8vw6
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Craftcms/cms
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-56381

To remediate this vulnerability, upgrade all affected Craftcms/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

craftcms/cms fixed: 5.8.22
Upgrade craftcms/cms to 5.8.22
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-56381, inspect your project dependencies for Craftcms/cms:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Craftcms/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.8.22), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Craftcms/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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](https://github.com/craftcms/cms/security/advisories/GHSA-2423-8xxj-wc3g)" and "[Multiple Stored XSS in User Group Edit Page](https://github.com/craftcms/cms/security/advisories/GHSA-vx7g-xw92-g4xj)". This affects a different sink: the individual user's permissions page. ## Proof of Concept ### Required Permissions - Admin access - `allowAdminChanges` is enabled in production, which is against our [security recommendations](https://craftcms.com/knowledge-base/securing-craft). ### Steps to Reproduce 1. Log in to the control panel as an admin 2. Navigate to **Settings → Users → User Groups** 3. Create or edit a user group and set the **Name** field to: ```html <img src=x onerror="alert('XSS')" hidden> ``` 4. Save the user group 5. Navigate to **Users** and edit any user (`/admin/users/{id}`) 6. Click on the **Permissions** tab 7. XSS executes ## Mitigation Sanitize user group names when rendering in the user permissions template. ## References https://github.com/craftcms/cms-ghsa-4mgv-366x-qxvx/pull/2

CVE-2026-56381 Affected Craftcms/cms Versions

1 component(s)
Fixed Versions:
5.8.22
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 5.0.0-RC1
< 5.8.22
5.8.22

References

Frequently Asked Questions

What is CVE-2026-56381?
CVE-2026-56381 is a security vulnerability in Craftcms/cms involving Craft CMS Vulnerable to Stored XSS via User Group Name in User Permissions Page under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Craftcms/cms versions are affected?
Affected versions include releases prior to 5.8.22 across affected packages: craftcms/cms.
What version fixes CVE-2026-56381?
Upgrading to 5.8.22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 5.8.22. Upgrade your dependency to 5.8.22 or later.
What CWE is associated with CVE-2026-56381?
CVE-2026-56381 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2026-56381?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g3hp-vvqf-8vw6",
  "modified" : "2026-08-06T21:37:54Z",
  "published" : "2026-03-11T14:56:59Z",
  "aliases" : [ "CVE-2026-56381" ],
  "summary" : "Craft CMS Vulnerable to Stored XSS via User Group Name in User Permissions Page",
  "details" : "## Summary\nA 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.\n\n> [!NOTE]\n> This is a separate vulnerability from the previously reported \"[Stored XSS via User Group Name in User Settings Page](https://github.com/craftcms/cms/security/advisories/GHSA-2423-8xxj-wc3g)\" and \"[Multiple Stored XSS in User Group Edit Page](https://github.com/craftcms/cms/security/advisories/GHSA-vx7g-xw92-g4xj)\". This affects a different sink: the individual user's permissions page.\n\n## Proof of Concept\n### Required Permissions\n- Admin access\n- `allowAdminChanges` is enabled in production, which is against our [security recommendations](https://craftcms.com/knowledge-base/securing-craft).\n\n### Steps to Reproduce\n1. Log in to the control panel as an admin\n2. Navigate to **Settings → Users → User Groups**\n3. Create or edit a user group and set the **Name** field to:\n    ```html\n    <img src=x onerror=\"alert('XSS')\" hidden>\n    ```\n4. Save the user group\n5. Navigate to **Users** and edit any user (`/admin/users/{id}`)\n6. Click on the **Permissions** tab\n7. XSS executes\n\n## Mitigation\nSanitize user group names when rendering in the user permissions template.\n\n## References\n\nhttps://github.com/craftcms/cms-ghsa-4mgv-366x-qxvx/pull/2",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-RC1"
      }, {
        "fixed" : "5.8.22"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.8.21"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/security/advisories/GHSA-g3hp-vvqf-8vw6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-56381"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/releases/tag/5.8.22"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/craft-cms-stored-xss-via-user-group-name-in-user-permissions-page"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-11T14:56:59Z",
    "nvd_published_at" : null
  }
}