Craft CMS has Stored XSS in Table Field via "HTML" Column Type
Published 23 Feb 2026 · Updated 24 Feb 2026
Is your project on an affected craftcms/cms?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=4.5.0-RC1 <4.16.19
- Fixed in
- 4.16.19
composer require craftcms/cms:^4.16.19- Affected
- >=5.0.0-RC1 <5.8.23
- Fixed in
- 5.8.23
composer require craftcms/cms:^5.8.23Details
A stored Cross-site Scripting (XSS) vulnerability exists in the editableTable.twig component when using the html column type. The application fails to sanitize the input, 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 our security recommendations.
Steps to Reproduce
1. Navigate to Settings → Fields and create a new field with Type: Table
1. Add a Column Heading and set Column Type to Single-line text
- Note: The vulnerable Column Type is
html, but it's not available in the UI dropdown.
1. In Default Values section, add a row with the following payload:
<img src=x onerror="alert('XSS')">1. Enable Static Rows
1. Intercept the Save Field request using a proxy tool (e.g., Burp Suite) or use cURL directly
1. Modify the request body and change the types[craft-fields-Table][columns][col3][type] parameter from singleline to html
1. Forward the request to save the field
1. Use the field in any object (e.g. user profile fields) → then visit the any user's profile
1. Notice the XSS execution
1. The XSS will also trigger when an administrator attempts to edit this field, as the malicious payload is executed within the field configuration page, too.
Resources
https://github.com/craftcms/cms/commit/f5d488d9bb6eff7670ed2c2fe30e15692e92c52b
Is GHSA-3jh3-prx3-w6wc in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected craftcms/cms, and gives you the command that fixes it.
More advisories for craftcms/cms
- CriticalCVE-2026-72780Craft CMS: Passkey login accepts replayed WebAuthn assertions · 7 Aug 2026
- MediumCVE-2026-72779Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts · 6 Aug 2026
- MediumCVE-2026-72782Craft CMS: Authenticated leak of secret environment variables · 6 Aug 2026
- MediumCVE-2026-72785Craft CMS: Authorization bypass: view-only Categories user can modify category structure via structures/move-element · 6 Aug 2026
- MediumCVE-2026-14794Craft CMS: Missing authorization check allows non-admin control panel users access to user registration metrics · 6 Aug 2026
- LowCVE-2026-72783Craft CMS: Incorrect path validation could potentially lead to path traversal · 6 Aug 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.