{"id":"CVE-2026-25496","aliases":["GHSA-9f5h-mmq6-2x78"],"url":"https://o3.security/vulnerability/CVE-2026-25496","summary":"Craft has a stored XSS in Number Prefix & Suffix Fields","details":"## Summary\n\nA 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.\n\n## Proof of Concept\n\n### Required Permissions\n\n- Administrator access\n- `allowAdminChanges` is enabled in production, which is against our [security recommendations](https://craftcms.com/knowledge-base/securing-craft).\n\n### Steps to Reproduce\n1. Log in with an admin account\n2. Navigate to **Settings** → **Fields** → **New field**\n3. Choose **Number** as the field type\n4. 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\" />\n```html\n<img src=x onerror=\"alert('Number Prefix/Suffix XSS')\" hidden>\n```\n5. Save the field\n6. Add this field to any element (e.g., User Profile fields via **Settings** → **Users** → **User Fields**)\n7. Navigate to your account (`/admin/myaccount`) or any user profile (`/admin/users/{id}`)\n8. 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\" />\n\n## Mitigation\nSanitize prefix/suffix before rendering or use `|e` filter instead of `|raw`.","published":"2026-02-09T19:45:19.835Z","modified":"2026-08-12T03:51:08.783152408Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"craftcms/cms","fixedVersion":"5.8.22"},{"ecosystem":"Packagist","name":"craftcms/cms","fixedVersion":"4.16.18"}],"fix":{"url":"https://github.com/craftcms/cms/commit/cb5fb0e979e72f315c9178fc031883d49527f513","label":"craftcms/cms@cb5fb0e"},"references":[{"type":"WEB","url":"https://github.com/craftcms/cms/releases/tag/5.8.22"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/25xxx/CVE-2026-25496.json"},{"type":"ADVISORY","url":"https://github.com/craftcms/cms/security/advisories/GHSA-9f5h-mmq6-2x78"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25496"},{"type":"FIX","url":"https://github.com/craftcms/cms/commit/cb5fb0e979e72f315c9178fc031883d49527f513"},{"type":"PACKAGE","url":"https://github.com/craftcms/cms"},{"type":"WEB","url":"https://github.com/craftcms/cms/releases/tag/4.16.18"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:08.783152408Z"}}