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

LOW
Advisory Identifier: GHSA-4mgv-366x-qxvx
CWE-79
Published
Advisory Summary

CVE-2026-56393 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 in settings names and field options. Remediation is available by upgrading affected packages to version 5.9.0-beta.1, 4.17.0-beta.1.

CVE-2026-56393 at a Glance

CVE Identifier CVE-2026-56393
GHSA Identifier GHSA-4mgv-366x-qxvx
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-56393

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.9.0-beta.1
Upgrade craftcms/cms to 5.9.0-beta.1
craftcms/cms fixed: 4.17.0-beta.1
Upgrade craftcms/cms to 4.17.0-beta.1
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-56393, 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.9.0-beta.1), 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

## Overview of all XSS Reports Multiple stored XSS vulnerabilities were found in Craft CMS. They were split into **4 reports** as follows: | Report | What's Vulnerable | Why Separate | |--------|-------------------|--------------| | **This Report (1)** | Multiple settings names | Twig Template: `_includes/forms/checkbox.twig` | | **Report 2** | Entry Types Name | Twig Template: `_includes/forms/editableTable.twig` | | **Report 3** | Card Attributes in Field Layout | `helpers/Cp.php` | | **Report 4 (Commerce)** | Product Type Name | Source in Commerce, sink in CMS - will report this one via Commerce GHSA | Reports 2, 3, and 4 are clearly distinct locations. For this report (Report 1), it was not clear whether to split or consolidate these 7 bugs. The bug report was consolidated and the final categorization should be left to the judgement of the user. **Note:** This overview is only in this Report. Other reports only reference this one. --- ## Summary Stored XSS in multiple settings. Names/labels are rendered without sanitization via `checkbox.twig` template which uses `{{ label|raw }}`. --- ## Affected Sources | # | Source (injection point) | Sink (where payload reflects) | | --- | ------------------------------------------------------------------------ | --------------------------------------------- | | 1 | Section Name (`/admin/settings/sections`) | Entries field -> Sources checklist | | 2 | Volume Name (`/admin/settings/assets/volumes/{vol_id}`) | Assets field -> Sources checklist | | 3 | User Group Name (`/admin/settings/users/groups`) | Users field -> Sources, User permissions page | | 4 | Global Set Name (`/admin/settings/globals`) | User permissions page | | 5 | Generated Fields Name (Volumes, Users, etc.) | Card Attributes checkboxes | | 6 | Checkboxes & Radio Buttons Field Option Label (`/admin/settings/fields`) | User profile pages | | 7 | Custom Sources Label (`/admin/users` -> Customize Sources) | Users field -> Sources checklist | --- ## Proof of Concept ### Required Permissions (Attacker) - Admin access - `allowAdminChanges` is enabled in production, which is against our [security recommendations](https://craftcms.com/knowledge-base/securing-craft). ### Bugs 1-3: Section, Volume, User Group Names 1. Log in as admin. 2. Inject payload in one of these: - **Settings** -> **Sections** -> Create/edit section -> **Name** - **Settings** -> **Assets** -> **Volumes** -> Create/edit volume -> **Name** - **Settings** -> **Users** -> **User Groups** -> Create/edit group -> **Name** 3. Set **Name** to: ```html <img src=x onerror="alert('XSS')"> ``` 4. Save. 5. Go to **Settings** -> **Fields** -> Create new field. 6. To trigger the XSS payload: Set **Field Type** to "Entries" (for Sections), "Assets" (for Volumes), or "Users" (for User Groups). The alert fires when the Sources checkbox list renders. **Note:** User Group Name also reflects on **User permissions page** under **User Groups** section (`/admin/users/{id}/permissions`). --- ### Bug 4: Global Set Name 1. Go to **Settings** -> **Globals** (`/admin/settings/globals`). 2. Create/edit a Global Set, set **Name** to payload. 3. Save. 4. Go to **Users** -> Edit any user -> **Permissions** tab (`/admin/users/{id}/permissions`). 5. Alert fires because our payload got rendered in the "Global Sets" permissions section without encoding/sanitization. --- ### Bug 5: Generated Fields Name 1. Go to **Settings** -> **Assets** -> **Volumes** -> Create/Edit a volume. 2. Scroll to **Generated Fields** section. 3. Add a field, set **Name** to payload: ```html <img src=x onerror="alert('XSS')"> ``` 4. Save & Notice the alert. The payload renders in the **Card Attributes** checkbox list below it. --- ### Bug 6: Checkboxes/Radio Buttons Option Label 1. Go to **Settings** -> **Fields** (`/admin/settings/fields`). 2. Create new field, set **Field Type** to "Checkboxes" or "Radio Buttons". 3. In **Field Options**, add an option with **Label** set to payload. 4. Save the field. 5. Go to **Settings** -> **Users** -> **User Profile Fields** (`/admin/settings/users/fields`). 6. Add the created field to the layout and save. 7. Alert fires on any user profile page (`/admin/users/{id}`). --- ### Bug 7: Custom Sources Label 1. Go to **Users** (`/admin/users`). 2. Click the three dots icon -> **Customize Sources**. 3. Create a new custom source, set **Label** to payload. 4. Save. 5. Go to **Settings** -> **Fields** -> Create new field. 6. Set **Field Type** to "Users". 7. Alert fires in the Sources checkbox list. ## Resources https://github.com/craftcms/cms/commit/943152d2246b36f12adf161a03b8695b773d9276 https://github.com/craftcms/cms/commit/67780a778c6ec04e68e64a0b1177c168306144a2

CVE-2026-56393 Affected Craftcms/cms Versions

2 component(s)
Fixed Versions:
5.9.0-beta.14.17.0-beta.1
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 5.0.0-RC1
< 5.9.0-beta.1
5.9.0-beta.1
craftcms/cms
Packagist
≥ 4.0.0-RC1
< 4.17.0-beta.1
4.17.0-beta.1

References

Frequently Asked Questions

What is CVE-2026-56393?
CVE-2026-56393 is a security vulnerability in Craftcms/cms involving Craft CMS Vulnerable to Stored XSS in Settings Names and Field Options 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.9.0-beta.1, 4.17.0-beta.1 across affected packages: craftcms/cms.
What version fixes CVE-2026-56393?
Upgrading to 5.9.0-beta.1, 4.17.0-beta.1 (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.9.0-beta.1, 4.17.0-beta.1. Upgrade your dependency to 5.9.0-beta.1, 4.17.0-beta.1 or later.
What CWE is associated with CVE-2026-56393?
CVE-2026-56393 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-56393?
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-4mgv-366x-qxvx",
  "modified" : "2026-08-06T21:39:51Z",
  "published" : "2026-03-03T20:58:07Z",
  "aliases" : [ "CVE-2026-56393" ],
  "summary" : "Craft CMS Vulnerable to Stored XSS in Settings Names and Field Options",
  "details" : "## Overview of all XSS Reports\n\nMultiple stored XSS vulnerabilities were found in Craft CMS. They were split into **4 reports** as follows:\n\n| Report | What's Vulnerable | Why Separate |\n|--------|-------------------|--------------|\n| **This Report (1)** | Multiple settings names | Twig Template: `_includes/forms/checkbox.twig` |\n| **Report 2** | Entry Types Name | Twig Template: `_includes/forms/editableTable.twig` |\n| **Report 3** | Card Attributes in Field Layout | `helpers/Cp.php` |\n| **Report 4 (Commerce)** | Product Type Name | Source in Commerce, sink in CMS - will report this one via Commerce GHSA |\n\nReports 2, 3, and 4 are clearly distinct locations. For this report (Report 1), it was not clear whether to split or consolidate these 7 bugs. The bug report was consolidated and the final categorization should be left to the judgement of the user.\n\n**Note:** This overview is only in this Report. Other reports only reference this one.\n\n---\n## Summary\n\nStored XSS in multiple settings. Names/labels are rendered without sanitization via `checkbox.twig` template which uses `{{ label|raw }}`.\n\n---\n## Affected Sources\n\n| #   | Source (injection point)                                                 | Sink (where payload reflects)                 |\n| --- | ------------------------------------------------------------------------ | --------------------------------------------- |\n| 1   | Section Name (`/admin/settings/sections`)                                | Entries field -> Sources checklist            |\n| 2   | Volume Name (`/admin/settings/assets/volumes/{vol_id}`)                  | Assets field -> Sources checklist             |\n| 3   | User Group Name (`/admin/settings/users/groups`)                         | Users field -> Sources, User permissions page |\n| 4   | Global Set Name (`/admin/settings/globals`)                              | User permissions page                         |\n| 5   | Generated Fields Name (Volumes, Users, etc.)                             | Card Attributes checkboxes                    |\n| 6   | Checkboxes & Radio Buttons Field Option Label (`/admin/settings/fields`) | User profile pages                            |\n| 7   | Custom Sources Label (`/admin/users` -> Customize Sources)               | Users field -> Sources checklist              |\n\n---\n## Proof of Concept\n\n### Required Permissions (Attacker)\n- Admin access\n- `allowAdminChanges` is enabled in production, which is against our [security recommendations](https://craftcms.com/knowledge-base/securing-craft).\n\n### Bugs 1-3: Section, Volume, User Group Names\n\n1. Log in as admin.\n2. Inject payload in one of these:\n   - **Settings** -> **Sections** -> Create/edit section -> **Name**\n   - **Settings** -> **Assets** -> **Volumes** -> Create/edit volume -> **Name**\n   - **Settings** -> **Users** -> **User Groups** -> Create/edit group -> **Name**\n3. Set **Name** to:\n```html\n<img src=x onerror=\"alert('XSS')\">\n```\n4. Save.\n5. Go to **Settings** -> **Fields** -> Create new field.\n6. To trigger the XSS payload: Set **Field Type** to \"Entries\" (for Sections), \"Assets\" (for Volumes), or \"Users\" (for User Groups). The alert fires when the Sources checkbox list renders.\n\n**Note:** User Group Name also reflects on **User permissions page** under **User Groups** section (`/admin/users/{id}/permissions`).\n\n---\n\n### Bug 4: Global Set Name\n\n1. Go to **Settings** -> **Globals** (`/admin/settings/globals`).\n2. Create/edit a Global Set, set **Name** to payload.\n3. Save.\n4. Go to **Users** -> Edit any user -> **Permissions** tab (`/admin/users/{id}/permissions`).\n5. Alert fires because our payload got rendered in the \"Global Sets\" permissions section without encoding/sanitization.\n\n---\n\n### Bug 5: Generated Fields Name\n\n1. Go to **Settings** -> **Assets** -> **Volumes** -> Create/Edit a volume.\n2. Scroll to **Generated Fields** section.\n3. Add a field, set **Name** to payload:\n```html\n<img src=x onerror=\"alert('XSS')\">\n```\n4. Save & Notice the alert. The payload renders in the **Card Attributes** checkbox list below it.\n\n---\n\n### Bug 6: Checkboxes/Radio Buttons Option Label\n\n1. Go to **Settings** -> **Fields** (`/admin/settings/fields`).\n2. Create new field, set **Field Type** to \"Checkboxes\" or \"Radio Buttons\".\n3. In **Field Options**, add an option with **Label** set to payload.\n4. Save the field.\n5. Go to **Settings** -> **Users** -> **User Profile Fields** (`/admin/settings/users/fields`).\n6. Add the created field to the layout and save.\n7. Alert fires on any user profile page (`/admin/users/{id}`).\n\n---\n\n### Bug 7: Custom Sources Label\n\n1. Go to **Users** (`/admin/users`).\n2. Click the three dots icon -> **Customize Sources**.\n3. Create a new custom source, set **Label** to payload.\n4. Save.\n5. Go to **Settings** -> **Fields** -> Create new field.\n6. Set **Field Type** to \"Users\".\n7. Alert fires in the Sources checkbox list.\n\n## Resources\n\nhttps://github.com/craftcms/cms/commit/943152d2246b36f12adf161a03b8695b773d9276\nhttps://github.com/craftcms/cms/commit/67780a778c6ec04e68e64a0b1177c168306144a2",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-RC1"
      }, {
        "fixed" : "5.9.0-beta.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-RC1"
      }, {
        "fixed" : "4.17.0-beta.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/security/advisories/GHSA-4mgv-366x-qxvx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-56393"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/commit/67780a778c6ec04e68e64a0b1177c168306144a2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/commit/943152d2246b36f12adf161a03b8695b773d9276"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/craft-cms-multiple-stored-cross-site-scripting-in-settings-names-and-field-options"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-03T20:58:07Z",
    "nvd_published_at" : null
  }
}