NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

CVE-2026-25496: Craft CMS Vulnerable to Stored XSS in Number Prefix & Suffix Fields

mediumCVSS 4.0 4.8GHSA-9f5h-mmq6-2x78

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

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:
  1. Save the field
  2. Add this field to any element (e.g., User Profile fields via Settings → Users → User Fields)
  3. Navigate to your account (/admin/myaccount) or any user profile (/admin/users/{id})
  4. XSS executes when viewing the form

Mitigation

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

Credited to mHe4am.

References

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) entries