Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. craftcms/cms
  4. ›
  5. GHSA-2rp4-x2j7-qmcc

GHSA-2rp4-x2j7-qmcc: Craft CMS: Stored XSS in the control panel via unescaped draft name

August 6, 2026

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.

A 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).

This 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.

References

  • github.com/advisories/GHSA-2rp4-x2j7-qmcc
  • github.com/craftcms/cms/commit/06c799148537ce960f6bc86e162b499947040eda
  • github.com/craftcms/cms/releases/tag/5.10.8
  • github.com/craftcms/cms/security/advisories/GHSA-2rp4-x2j7-qmcc

Code Behaviors & Features

Detect and mitigate GHSA-2rp4-x2j7-qmcc with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 5.0.0-RC1 before 5.10.8

Fixed versions

  • 5.10.8

Solution

Upgrade to version 5.10.8 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/craftcms/cms/GHSA-2rp4-x2j7-qmcc.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:40 +0000.