{"id":"CVE-2026-72787","aliases":["GHSA-2rp4-x2j7-qmcc"],"url":"https://o3.security/vulnerability/CVE-2026-72787","summary":"Craft CMS 5.0.0-RC1 before 5.10.8 Stored XSS via Draft Name","details":"The control-panel helper that renders element chip/card labels writes an element's `draftName` into the page without HTML-encoding it, while the surrounding path segments are encoded.\n\nA low-privilege control-panel user who can create a draft of an element (for example, an entry) controls the draft name, so they can store an XSS payload that executes in the browser of any other control-panel user who is shown that element’s chip or card (element indexes with drafts visible, relation and element-selection fields that reference the element, and the drafts list).\n\nThis allows a low-privilege author to run JavaScript in an administrator’s authenticated session and take over the control panel. It is the same output-encoding class as the recently fixed GHSA-xrqc-p465-2xvg (Structure entry title) and GHSA-3x4w-mxpf-fhqq (revision context menu), which encoded other user-controlled titles but not the draft name.\n\n### Prerequisites\n\n- A control-panel account with permission to edit entries in at least one section and create drafts.\n- A higher-privileged user (for example, an administrator) who is later shown the draft’s chip or card (an element index with drafts visible, or a relation/element-selection field referencing the element).\n\n### Limitations\n\n- Requires the victim to be shown the affected element's chip/card in the control panel (normal day-to-day activity; element indexes and relation fields are routine).\n- The payload runs in the control-panel origin in the victim’s session.\n\n## Impact\n\nA low-privilege author can run arbitrary JavaScript in the session of any higher-privileged control-panel user who is shown the element’s chip or card, including administrators. This is a cross-privilege stored XSS, not a self-XSS: the attacker and the victim are different users, and the payload fires during routine browsing of element indexes and relation fields.\n\nBecause the script runs in the victim’s control-panel origin, it can read the CSRF token that Craft embeds in the page JavaScript (`Craft.csrfTokenValue`, confirmed present on control-panel pages) and issue authenticated control-panel actions as the victim. This was verified end-to-end on Craft Pro: an in-session request to the `users/save-user` action created a brand new account (`User saved.`, HTTP 200), an admin-only capability that an author can never perform directly.","published":"2026-08-12T19:07:36.918Z","modified":"2026-09-02T03:30:28.159453894Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"Packagist","name":"craftcms/cms","fixedVersion":"5.10.8"}],"fix":{"url":"https://github.com/craftcms/cms/commit/06c799148537ce960f6bc86e162b499947040eda","label":"craftcms/cms@06c7991"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72787.json"},{"type":"ADVISORY","url":"https://github.com/craftcms/cms/security/advisories/GHSA-2rp4-x2j7-qmcc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72787"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/craft-cms-rc1-before-stored-xss-via-draft-name"},{"type":"WEB","url":"https://github.com/craftcms/cms/commit/06c799148537ce960f6bc86e162b499947040eda"},{"type":"PACKAGE","url":"https://github.com/craftcms/cms"},{"type":"WEB","url":"https://github.com/craftcms/cms/releases/tag/5.10.8"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-09-02T03:30:28.159453894Z"}}