CVE-2026-25496: Craft has a stored XSS in Number Prefix & Suffix Fields

Published Feb 9, 2026
·
Updated

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 - allowAdminChanges is enabled in production, which is against our security recommendations.

Steps to Reproduce 1. Log in with an admin account 2. Navigate to Settings → Fields → New field 3. Choose Number as the field type 4. Set the Prefix/Suffix Text field to: <img width="611" height="908" alt="image" src="https://github.com/user-attachments/assets/63766ca4-4fa9-490b-8bea-37364137527d" /> html <img src=x onerror="alert('Number Prefix/Suffix XSS')" hidden> 5. Save the field 6. Add this field to any element (e.g., User Profile fields via Settings → Users → User Fields) 7. Navigate to your account (/admin/myaccount) or any user profile (/admin/users/{id}) 8. XSS executes when viewing the form <img width="1246" height="677" alt="image-1" src="https://github.com/user-attachments/assets/dafeb2b7-905f-4a4b-b3d6-1c16a905498f" />

Mitigation Sanitize prefix/suffix before rendering or use |e filter instead of |raw.

Other sources

Craft is a platform for creating digital experiences. In Craft versions 4.0.0-RC1 through 4.16.17 and 5.0.0-RC1 through 5.8.21, 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. This issue is patched in versions 4.16.18 and 5.8.22.

MITRE

Affected Software

11 affected componentsFixes available
craft/craft>=4.0.0-RC1<=4.16.17, >=5.0.0-RC1<=5.8.21
composer/craftcms/cms>=4.0.0-RC1<=4.16.17
4.16.18
composer/craftcms/cms>=5.0.0-RC1<=5.8.21
5.8.22
CraftCMS Craft CMS>4.0.0<4.16.18
CraftCMS Craft CMS>5.0.0<5.8.22
CraftCMS Craft CMS=4.0.0
CraftCMS Craft CMS=4.0.0-rc1
CraftCMS Craft CMS=4.0.0-rc2
CraftCMS Craft CMS=4.0.0-rc3
CraftCMS Craft CMS=5.0.0
CraftCMS Craft CMS=5.0.0-rc1

Event History

Feb 9, 2026
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
RemedyAffected Software
Advisory Published
via GitHub·08:35 PM
Data Sourced
via GitHub·08:35 PM
DescriptionWeaknessAffected Software
Aug 19, 58109
Event
via FIRST·03:58 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-25496?

CVE-2026-25496 is considered a medium severity vulnerability due to its potential for stored cross-site scripting attacks.

2

How do I fix CVE-2026-25496?

To fix CVE-2026-25496, update your Craft CMS installation to version 5.8.22 or later.

3

Which versions are affected by CVE-2026-25496?

CVE-2026-25496 affects Craft CMS versions 4.0.0-RC1 through 4.16.17 and 5.0.0-RC1 through 5.8.21.

4

What types of attacks can CVE-2026-25496 enable?

CVE-2026-25496 can enable stored cross-site scripting attacks, allowing attackers to inject malicious scripts.

5

Is user interaction required for CVE-2026-25496 to be exploited?

No user interaction is required for CVE-2026-25496 to be exploited, as it allows injection of scripts that can run automatically.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203