Craft CMS has Stored XSS in Table Field in its "Row Heading" Column Type
Impact
A stored Cross-site Scripting (XSS) vulnerability exists in the editableTable.twig component when using the Row Heading column type. The application fails to sanitize input within row headings, allowing an attacker to execute arbitrary JavaScript when another user views a page with the malicious table field.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 4.5.0-beta.1 before 4.16.19Ecosystem versions | 4.16.19 |
| From 5.0.0-RC1 before 5.8.23Ecosystem versions | 5.8.23 |
Version evidence: OSV · GHSA-6j87-m5qx-9fqp
View original version evidence (291 explicit versions)
Original source description
A stored Cross-site Scripting (XSS) vulnerability exists in the editableTable.twig component when using the Row Heading column type. The application fails to sanitize input within row headings, allowing an attacker to execute arbitrary JavaScript when another user views a page with the malicious table field.
Prerequisites
- An administrator account
allowAdminChangesmust be enabled in production, which is against security recommendations.
Steps to Reproduce
- Navigate to Settings → Fields and create a new field with Type: Table
- Add a Column Heading and set Column Type to
Row Heading - In Default Values section, add a row with the following payload:
<img src=x onerror="alert('XSS')"> - Enable
Static Rows - Use the field in any object (e.g., user profile fields) → then visit any user’s profile
- Notice the XSS execution
Resources
https://github.com/craftcms/cms/commit/7b372de262b8d9d2ce859f32780c3715719b6f5a
References
- Security advisory github.com/craftcms/cms/security/advisories/GHSA-6j87-m5qx-9fqp
- Security advisory nvd.nist.gov/vuln/detail/CVE-2026-56383
- Patch github.com/craftcms/cms/commit/7b372de262b8d9d2ce859f32780c3715719b6f5a
- Source reference craftcms.com/knowledge-base/securing-craft
- Source reference github.com/craftcms/cms
- Release notes github.com/craftcms/cms/releases/tag/4.16.19
- Release notes github.com/craftcms/cms/releases/tag/5.8.23
- Security advisory www.vulncheck.com/advisories/craft-cms-stored-xss-in-table-field-via-row-heading-column-type