5.9medium
Craft CMS has Stored XSS in Table Field via "HTML" Column Type
- Severity
- 5.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.24% (higher than 16% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-3jh3-prx3-w6wc
Description
Craft is a content management system (CMS). In versions 4.5.0-RC1 through 4.16.18 and 5.0.0-RC1 through 5.8.22, 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. In order to exploit the vulnerability, an attacker must have an administrator account, and `allowAdminChanges` must be enabled in production, which is against Craft's security recommendations. Versions 4.16.19 and 5.8.23 patch the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| craftcms cms | >= 4.5.0-RC1, < 4.16.19, >= 5.0.0-RC1, < 5.8.23 | CVE List |
| craftcms/cms (Packagist) | from 4.5.0-RC1 before 4.16.19, from 5.0.0-RC1 before 5.8.23 | GitHub Advisory Database |
| craftcms craft_cms | from >4.5.0 before 4.16.19, from >5.0.0 before 5.8.23, 4.5.0, 5.0.0 | NVD |
All scores
| GitHub_M | 5.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N |
| NVD | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Craft is a content management system (CMS). In versions 4.5.0-RC1 through 4.16.18 and 5.0.0-RC1 through 5.8.22, 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. In order to exploit the vulnerability, an attacker must have an administrator account, and `allowAdminChanges` must be enabled in production, which is against Craft's security recommendations. Versions 4.16.19 and 5.8.23 patch the issue.
GitHub Advisory Database
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
- Navigate to Settings → Fields and create a new field with Type: Table
- 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.
- Note: The vulnerable Column Type is
- In Default Values section, add a row with the following payload:
<img src=x onerror="alert('XSS')"> - Enable
Static Rows - Intercept the Save Field request using a proxy tool (e.g., Burp Suite) or use
cURLdirectly - Modify the request body and change the
types[craft-fields-Table][columns][col3][type]parameter fromsinglelinetohtml - Forward the request to save the field
- Use the field in any object (e.g. user profile fields) → then visit the any user's profile
- Notice the XSS execution
- 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
NVD (es)
Craft es un sistema de gestión de contenido (CMS). En las versiones 4.5.0-RC1 a 4.16.18 y 5.0.0-RC1 a 5.8.22, existe una vulnerabilidad de cross-site scripting (XSS) almacenado en el componente 'editableTable.twig' al usar el tipo de columna 'html'. La aplicación no sanitiza la entrada, permitiendo a un atacante ejecutar JavaScript arbitrario cuando otro usuario ve una página con el campo de tabla malicioso. Para explotar la vulnerabilidad, un atacante debe tener una cuenta de administrador, y 'allowAdminChanges' debe estar habilitado en producción, lo cual va en contra de las recomendaciones de seguridad de Craft. Las versiones 4.16.19 y 5.8.23 parchean el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-27126 changed 2026-02-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3jh3-prx3-w6wc changed 2026-02-24 | CC-BY-4.0 |
| NVD | CVE-2026-27126 changed 2026-06-17 | Public domain |