Advisory

GHSA-3jh3-prx3-w6wc

Also known as: CVE-2026-27126

Summary

Craft CMS has Stored XSS in Table Field via "HTML" Column Type

Details

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

Steps to Reproduce

  1. Navigate to Settings → Fields and create a new field with Type: Table
  2. 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.
  3. In Default Values section, add a row with the following payload: html <img src=x onerror="alert('XSS')">
  4. Enable Static Rows
  5. Intercept the Save Field request using a proxy tool (e.g., Burp Suite) or use cURL directly
  6. Modify the request body and change the types[craft-fields-Table][columns][col3][type] parameter from singleline to html
  7. Forward the request to save the field
  8. Use the field in any object (e.g. user profile fields) → then visit the any user's profile
  9. Notice the XSS execution
  10. 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

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-02-23 22:15 UTC
Modified
2026-02-24 16:19 UTC

Affected packages and fixes

craftcms/cms

Packagist · All systems

Affected

  • introduced 4.5.0-RC1, fixed 4.16.19 (ecosystem)

Fixed versions

4.16.19

Fix

The export has no generic command for this ecosystem.

craftcms/cms

Packagist · All systems

Affected

  • introduced 5.0.0-RC1, fixed 5.8.23 (ecosystem)

Fixed versions

5.8.23

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences