{"id":"CVE-2026-56393","aliases":["CVE-2026-56393","GHSA-4mgv-366x-qxvx"],"related":[],"kind":"vulnerability","state":"published","title":"Craft CMS - Multiple Stored Cross-Site Scripting in Settings Names and Field Options","summary":"Craft CMS 4.x (>= 4.0.0-RC1, < 4.17.0-beta.1) and 5.x (>= 5.0.0-RC1, < 5.9.0-beta.1) contain multiple stored cross-site scripting vulnerabilities where settings names and field option labels are rendered without sanitization (e.g., via the checkbox.twig template, which used {{ label|raw }}). An authenticated administrator (with allowAdminChanges enabled) can inject malicious payloads into section names, volume names, user group names, global set names, generated field names, checkbox/radio option labels, and custom source labels, causing arbitrary JavaScript to execute in other users' control-panel sessions. Fixed in 4.17.0-beta.1 and 5.9.0-beta.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Craft CMS 4.x (>= 4.0.0-RC1, < 4.17.0-beta.1) and 5.x (>= 5.0.0-RC1, < 5.9.0-beta.1) contain multiple stored cross-site scripting vulnerabilities where settings names and field option labels are rendered without sanitization (e.g., via the checkbox.twig template, which used {{ label|raw }}). An authenticated administrator (with allowAdminChanges enabled) can inject malicious payloads into section names, volume names, user group names, global set names, generated field names, checkbox/radio option labels, and custom source labels, causing arbitrary JavaScript to execute in other users' control-panel sessions. Fixed in 4.17.0-beta.1 and 5.9.0-beta.1.","source":"cvelist"},{"lang":"en","text":"## 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"Craft CMS 4.x (>= 4.0.0-RC1, anterior a 4.17.0-beta.1) y 5.x (>= 5.0.0-RC1, anterior a 5.9.0-beta.1) contienen múltiples vulnerabilidades de cross-site scripting almacenado donde los nombres de las configuraciones y las etiquetas de las opciones de campo se renderizan sin sanitización (por ejemplo, a través de la plantilla checkbox.twig, que utilizaba {{ label|raw }}). Un administrador autenticado (con allowAdminChanges habilitado) puede inyectar cargas útiles maliciosas en nombres de secciones, nombres de volúmenes, nombres de grupos de usuarios, nombres de conjuntos globales, nombres de campos generados, etiquetas de opciones de casilla de verificación/radio y etiquetas de fuentes personalizadas, causando que JavaScript arbitrario se ejecute en las sesiones del panel de control de otros usuarios. Corregido en 4.17.0-beta.1 y 5.9.0-beta.1.","source":"nvd"}],"published":"2026-03-03T20:58:07.000Z","modified":"2026-11-08T14:06:11.266Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","score":4.6,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"5.0.0-RC1","fixed":"5.9.0-beta.1","status":"affected"},{"type":"semver","version":"5.9.0-beta.1","status":"unaffected"},{"type":"semver","introduced":"4.0.0-RC1","fixed":"4.17.0-beta.1","status":"affected"},{"type":"semver","version":"4.17.0-beta.1","status":"unaffected"}],"vendor":"craftcms","product":"cms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0-RC1","status":"affected","fixed":"5.9.0-beta.1"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0-RC1","status":"affected","fixed":"4.17.0-beta.1"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-4mgv-366x-qxvx","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/cms/commit/943152d2246b36f12adf161a03b8695b773d9276","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/cms/commit/67780a778c6ec04e68e64a0b1177c168306144a2","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/craft-cms-multiple-stored-cross-site-scripting-in-settings-names-and-field-options","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56393","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms","tags":["package"],"sources":["ghsa"]}],"credits":["mHe4am"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-22T13:21:37.669Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-56393","url":"https://www.cve.org/CVERecord?id=CVE-2026-56393","licence":"CVE Terms of Use","modified":"2026-11-08T14:06:11.266Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4mgv-366x-qxvx","url":"https://github.com/advisories/GHSA-4mgv-366x-qxvx","licence":"CC-BY-4.0","modified":"2026-08-06T21:45:58.167Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-56393","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-56393","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.331Z","epss":{"score":0.00225,"percentile":0.14005,"date":"2026-12-01T12:00:22.000Z"}}