ADVISORIES

GitHub Advisory Database

GHSA-7pr4-wx9w-mqwr

Craft CMS Vulnerable to Stored XSS in Entry Types Name

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.

Steps to Reproduce

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

Affected packages

EcosystemPackageAffected versions
Packagistcraftcms/cms
From 5.0.0-RC1 before 5.8.22 (fixed in 5.8.22)

References