Craft CMS: Stored XSS in the control panel via unescaped draft name
A stored cross-site scripting (XSS) vulnerability exists in Craft CMS control panel where an element's draft name is rendered without proper HTML encoding. A low-privilege user who can create drafts can inject JavaScript payloads into the draft name, which execute in the browsers of higher-privileged users viewing the draft's chip or card. This allows the attacker to execute arbitrary JavaScript in the victim's authenticated control panel session, potentially taking over the control panel by performing admin-only actions via the victim's session.
AI Analysis
Technical Summary
The vulnerability arises because the control-panel helper that renders element chip/card labels writes the element's draftName directly into the page without HTML encoding, while other path segments are encoded. A low-privilege user with permission to create drafts can inject a stored XSS payload in the draft name. When a higher-privileged user views the draft's chip or card in element indexes or relation fields, the payload executes in their control panel session. This enables the attacker to run arbitrary JavaScript, including reading the embedded CSRF token and issuing authenticated control panel actions as the victim, such as creating new admin accounts. The vulnerability is a cross-privilege stored XSS, not self-XSS, and affects routine control panel usage.
Potential Impact
Allows a low-privilege user to execute arbitrary JavaScript in the session of higher-privileged control panel users, including administrators. This can lead to full control panel takeover by performing authenticated actions on behalf of the victim, such as creating new admin accounts. The attack requires the victim to view the affected draft's chip or card in the control panel, which is common during normal use. The vulnerability compromises the confidentiality and integrity of the control panel environment.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix provided by the vendor to ensure the draftName is properly HTML-encoded before rendering. Until patched, restrict draft creation permissions to trusted users and avoid exposing draft chips/cards to higher-privileged users if possible. Check the vendor advisory for the official patch and remediation instructions.
Craft CMS: Stored XSS in the control panel via unescaped draft name
Description
A stored cross-site scripting (XSS) vulnerability exists in Craft CMS control panel where an element's draft name is rendered without proper HTML encoding. A low-privilege user who can create drafts can inject JavaScript payloads into the draft name, which execute in the browsers of higher-privileged users viewing the draft's chip or card. This allows the attacker to execute arbitrary JavaScript in the victim's authenticated control panel session, potentially taking over the control panel by performing admin-only actions via the victim's session.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because the control-panel helper that renders element chip/card labels writes the element's draftName directly into the page without HTML encoding, while other path segments are encoded. A low-privilege user with permission to create drafts can inject a stored XSS payload in the draft name. When a higher-privileged user views the draft's chip or card in element indexes or relation fields, the payload executes in their control panel session. This enables the attacker to run arbitrary JavaScript, including reading the embedded CSRF token and issuing authenticated control panel actions as the victim, such as creating new admin accounts. The vulnerability is a cross-privilege stored XSS, not self-XSS, and affects routine control panel usage.
Potential Impact
Allows a low-privilege user to execute arbitrary JavaScript in the session of higher-privileged control panel users, including administrators. This can lead to full control panel takeover by performing authenticated actions on behalf of the victim, such as creating new admin accounts. The attack requires the victim to view the affected draft's chip or card in the control panel, which is common during normal use. The vulnerability compromises the confidentiality and integrity of the control panel environment.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix provided by the vendor to ensure the draftName is properly HTML-encoded before rendering. Until patched, restrict draft creation permissions to trusted users and avoid exposing draft chips/cards to higher-privileged users if possible. Check the vendor advisory for the official patch and remediation instructions.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-2rp4-x2j7-qmcc
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a7573bbbf8831d539d9419d
Added to database: 08/07/2026, 05:57:15 UTC
Last enriched: 08/07/2026, 07:01:05 UTC
Last updated: 08/07/2026, 11:57:07 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.