6.2medium
Craft Commerce has Stored XSS in Shipping Categories (Name & Description) Fields Leading to Potential Privilege Escalation
- Severity
- 6.2medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.30% (higher than 24% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-w8gw-qm8p-j9j3
Description
Craft Commerce is an ecommerce platform for Craft CMS. In versions from 4.0.0-RC1 to 4.10.0 and from 5.0.0 to 5.5.1, a stored XSS vulnerability in Craft Commerce allows attackers to execute malicious JavaScript in an administrator’s browser. This occurs because the Shipping Categories (Name & Description) fields in the Store Management section are not properly sanitized before being displayed in the admin panel. This issue has been patched in versions 4.10.1 and 5.5.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| craftcms commerce | >= 4.0.0-RC1, < 4.10.1, >= 5.0.0, < 5.5.2 | CVE List |
| craftcms/composer (Packagist) | from 5.0.0-RC1 before 5.5.2, from 4.0.0-RC1 before 4.10.1 | GitHub Advisory Database |
| craftcms craft_commerce | from 4.0.1 before 4.10.1, from 5.0.0 before 5.5.2, 4.0.0 | NVD |
All scores
| GitHub_M | 6.2medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N |
| NVD | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Craft Commerce is an ecommerce platform for Craft CMS. In versions from 4.0.0-RC1 to 4.10.0 and from 5.0.0 to 5.5.1, a stored XSS vulnerability in Craft Commerce allows attackers to execute malicious JavaScript in an administrator’s browser. This occurs because the Shipping Categories (Name & Description) fields in the Store Management section are not properly sanitized before being displayed in the admin panel. This issue has been patched in versions 4.10.1 and 5.5.2.
GitHub Advisory Database
Summary
A stored XSS vulnerability in Craft Commerce allows attackers to execute malicious JavaScript in an administrator’s browser. This occurs because the Shipping Categories (Name & Description) fields in the Store Management section are not properly sanitized before being displayed in the admin panel.
Proof of Concept
Requirments
- General permissions:
- Access the control panel
- Access Craft Commerce
- Craft Commerce permissions:
- Manage store settings
- Manage shipping
- An active administrator elevated session
Steps to Reproduce
- Log in to the Admin Panel with the attacker account with the permissions mentioned above.
- Navigate to Commerce -> Store Management -> Shipping Categories (
/admin/commerce/store-management/primary/shippingcategories). - Create a new shipping category.
- In the Name field, enter the following payload:
<img src=x onerror="alert(document.domain)">
- Click Save & Go back to the previous page.
- Notice the alert proving JavaScript execution.
Privilege Escalation to Administrator:
- Do the same steps above, but replace the payload with a malicious one.
- The following payload elevates the attacker’s account to Admin if there’s already an elevated session, replace the
<UserID>with your attacker id:
<img src=x onerror="fetch('/admin/users/<UserID>/permissions',{method:'POST',body:`CRAFT_CSRF_TOKEN=${Craft.csrfTokenValue}&userId=<UserID>&admin=1&action=users/save-permissions`,headers:{'content-type':'application/x-www-form-urlencoded'}})">
- In another browser, log in as an admin & go to the vulnerable page (shipping categories page).
- Go back to your attacker account & notice you are now an admin.
The privilege escalation requires an elevated session. In a real-world scenario, an attacker can automate the process by forcing a logout if the victim’s session is stale; upon re-authentication, the stored XSS payload executes within a fresh elevated session to complete the attack.
Or even easier (and smarter), an attacker (using the XSS) can create a fake 'Session Expired' login modal overlay. Since it’s on the trusted domain, administrators will likely enter their credentials, sending them directly to the attacker.
Resources:
https://github.com/craftcms/commerce/commit/fa273330807807d05b564d37c88654cd772839ee
NVD (es)
Craft Commerce es una plataforma de comercio electrónico para Craft CMS. En las versiones desde la 4.0.0-RC1 hasta la 4.10.0 y desde la 5.0.0 hasta la 5.5.1, una vulnerabilidad de XSS almacenado en Craft Commerce permite a los atacantes ejecutar JavaScript malicioso en el navegador de un administrador. Esto ocurre porque los campos de Categorías de Envío (Nombre y Descripción) en la sección de Gestión de Tienda no se sanean correctamente antes de ser mostrados en el panel de administración. Este problema ha sido parcheado en las versiones 4.10.1 y 5.5.2.
References
| https://github.com/craftcms/commerce/security/advisories/GHSA-w8gw-qm8p-j9j3 | exploit, vendor-advisory, web | |
| https://github.com/craftcms/commerce/commit/fa273330807807d05b564d37c88654cd772839ee | patch, web | |
| https://github.com/craftcms/commerce/releases/tag/4.10.1 | release-notes, web | |
| https://github.com/craftcms/commerce/releases/tag/5.5.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-25485 | advisory | |
| https://github.com/craftcms/commerce | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-25485 changed 2026-02-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w8gw-qm8p-j9j3 changed 2026-02-22 | CC-BY-4.0 |
| NVD | CVE-2026-25485 changed 2026-06-17 | Public domain |