CVE-2026-25496: Craft CMS Vulnerable to Stored XSS in Number Prefix & Suffix Fields
Summary A stored XSS vulnerability exists in the Number field type settings. The Prefix and Suffix fields are rendered using the mdraw Twig filter without proper escaping, allowing script execution when the Number field is displayed on users' profiles. Proof of Concept Required Permissions - Administrator access - allowAdminChanges is enabled in production, which is against our security recommendations.
Published Feb 9, 2026
Affected packages
craftcms/cms
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0-RC1, <= 5.8.21
- Fixed in
- 5.8.22
- Check
composer show craftcms/cms
craftcms/cms
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.0.0-RC1, <= 4.16.17
- Fixed in
- 4.16.18
- Check
composer show craftcms/cms
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A stored XSS vulnerability exists in the Number field type settings. The Prefix and Suffix fields are rendered using the |md|raw Twig filter without proper escaping, allowing script execution when the Number field is displayed on users' profiles.
Proof of Concept
Required Permissions
- Administrator access
allowAdminChangesis enabled in production, which is against our security recommendations.
Steps to Reproduce
- Log in with an admin account
- Navigate to Settings → Fields → New field
- Choose Number as the field type
- Set the Prefix/Suffix Text field to:
- Save the field
- Add this field to any element (e.g., User Profile fields via Settings → Users → User Fields)
- Navigate to your account (
/admin/myaccount) or any user profile (/admin/users/{id}) - XSS executes when viewing the form
Mitigation
Sanitize prefix/suffix before rendering or use |e filter instead of |raw.
Credited to mHe4am.
References
- https://github.com/craftcms/cms/security/advisories/GHSA-9f5h-mmq6-2x78
- https://github.com/craftcms/cms/commit/cb5fb0e979e72f315c9178fc031883d49527f513
- https://github.com/craftcms/cms/releases/tag/4.16.18
- https://github.com/craftcms/cms/releases/tag/5.8.22
- https://nvd.nist.gov/vuln/detail/CVE-2026-25496
- https://github.com/advisories/GHSA-9f5h-mmq6-2x78
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesGHSA-wg23-69c2-gjc8
Craft CMS: Passkey login accepts replayed WebAuthn assertions
critical9.1Aug 7, 2026CVE-2026-14793
Craft CMS: Missing authorization check allows non-admin control panel users to reorder Global Sets
medium4.3Aug 6, 2026CVE-2026-14794
Craft CMS: Missing authorization check allows non-admin control panel users access to user registration metrics
medium4.3Aug 6, 2026CVE-2026-72778
Craft CMS: Authenticated RCE via `condition.config` JSON cleanse bypass
high8.7Aug 6, 2026CVE-2026-72779
Craft CMS: Arbitrary file read via SplFileObject in non-sandboxed template contexts
medium6.9Aug 6, 2026CVE-2026-72781
Craft CMS: Authenticated RCE through Twig sandbox escape
high8.7Aug 6, 2026
