craftcms/commerce
Affected
- introduced
5.0.0, fixed5.5.2(ecosystem)
Fixed versions
5.5.2
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2026-25482
Craft Commerce has Stored DOM XSS in Order Status Name (Reflects in "Recent Orders" Dashboard Widget)
Summary
A stored DOM XSS vulnerability exists in the "Recent Orders" dashboard widget. The Order Status Name is rendered via JavaScript string concatenation without proper escaping, allowing script execution when any admin visits the dashboard.
Users are recommended to update to the patched 5.5.2 release to mitigate the issue.
---
Proof of Concept
Required Permissions
Steps to Reproduce
<img src=x onerror="alert('Order Statuses XSS')" hidden>
/admin/dashboard) & Add "Recent Orders" widget and pick the same 2 statuses for orders---
Technical Details
File: vendor/craftcms/commerce/src/templates/_components/widgets/orders/recent/body.twig
Root Cause: value.name (the Order Status Name) is concatenated directly into the HTML string without sanitization. When JavaScript inserts this HTML into the DOM, any malicious tags/scripts in the name are executed.<img width="1780" height="858" alt="vulnerable-code" src="https://github.com/user-attachments/assets/b150ee9d-c072-4987-b506-81a29c23d84b" />
---
Mitigation
Use Craft.escapeHtml() in the callback:
callback: function(value) {
return '<span class="commerceStatusLabel"><span class="status ' + Craft.escapeHtml(value.color) + '"></span>' + Craft.escapeHtml(value.name) + '</span>';
}
Resources:
https://github.com/craftcms/commerce/commit/d94d1c9832a47a1c383e375ae87c46c13935ba65
Medium Basis: The source's own band: MODERATE
5.0.0, fixed 5.5.2 (ecosystem)5.5.2
The export has no generic command for this ecosystem.
4.0.0-RC1, fixed 4.10.1 (ecosystem)4.10.1
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0