CVE-2022-37247: Craft CMS vulnerable to stored Cross-site Scripting via /admin/settings/fields page
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.35541%
CWE
Published
9/17/2022
Updated
1/31/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| craftcms/cms | composer | >= 4.0.0-RC1, < 4.2.1 | 4.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unescaped output of user-controlled data in field configuration UIs. The patch adds HTML encoding:
- In Cp.php, Html::encode() was added to $tab->name and $groupName outputs
- In index.twig, the |e filter was added to group.name translation These locations previously directly output user-controlled field/tab/group names without sanitization, enabling stored XSS payloads to execute in the admin panel.