VDB
Sign up
LOW1.9

GHSA-7pr4-wx9w-mqwr

Craft CMS Vulnerable to Stored XSS in Entry Types Name

Quick fix

GHSA-7pr4-wx9w-mqwr — craftcms/cms: upgrade to the fixed version with the command below.

composer require craftcms/cms:^5.8.22

Details

## Summary

Stored XSS via Entry Type names. The name is not sanitized when displayed in the Entry Types list.

--- ## Proof of Concept

### Required Permissions (Attacker)

- Admin access (only admins have access to the settings page) - `allowAdminChanges` is enabled in production, which is against our [security recommendations](https://craftcms.com/knowledge-base/securing-craft).

### Steps to Reproduce 1. Log in as an attacker. 2. Go to **Settings** -> **Entry Types** (`/admin/settings/entry-types`). 3. Create a new Entry Type. 4. Set **Name** to: ```html <img src=x onerror="alert('XSS-EntryTypes')" hidden> ``` 5. Save the Entry Type, and you’ll be redirected back to the entry types table automatically. 6. Notice the alert fires when the entry types table renders.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/craftcms/cms
Introduced in: 5.0.0-RC1Fixed in: 5.8.22
Fixcomposer require craftcms/cms:^5.8.22

References