همهٔ گزارش‌ها
متوسط

Craft CMS Vulnerable to Stored XSS in Number Prefix & Suffix Fields

متن اصلی

نسخه‌های متأثر

نسخه‌های متأثر
>= 4.0.0-RC1, <= 4.16.17
نسخهٔ اصلاح‌شده
4.16.18
نسخه‌های متأثر
>= 5.0.0-RC1, <= 5.8.21
نسخهٔ اصلاح‌شده
5.8.22

بهره‌برداری

CVE-2026-25496

احتمال بهره‌برداری در ۳۰ روز آینده: 0.41%

FIRST EPSS · ۱۴۰۵/۰۸/۲۸

شرح آسیب‌پذیری

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:

<img src=x onerror="alert('Number Prefix/Suffix XSS')" hidden>
  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.

پیوندها

گزارش‌دهندگان

  • mHe4am