{"id":"CVE-2026-25482","aliases":["CVE-2026-25482","GHSA-frj9-9rwc-pw9j"],"related":[],"kind":"vulnerability","state":"published","title":"Craft Commerce has Stored DOM XSS in Order Status Name (Reflects in \"Recent Orders\" Dashboard Widget)","summary":"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 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. This issue has been patched in versions 4.10.1 and 5.5.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 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. This issue has been patched in versions 4.10.1 and 5.5.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA 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.\n\nUsers are recommended to update to the patched 5.5.2 release to mitigate the issue.\n\n---\n## Proof of Concept\n\n### Required Permissions\n\n- Admin access (to edit/create Order Statuses)\n\n### Steps to Reproduce\n1. Log in with an admin account\n2. Navigate to **Commerce** → **Settings** → **Order Statuses**\n3. Create new order status (e.g., \"Pending\")\n4. Set the **Name** field to:\n```html\n<img src=x onerror=\"alert('Order Statuses XSS')\" hidden>\n```\n5. Save the order status\n6. Go to Commerce Orders & make some orders with different statuses (e.g. \"New\" & \"the malicious created status\")\n7. Go to the Dashboard (`/admin/dashboard`) & Add **\"Recent Orders\"** widget and pick the same 2 statuses for orders\n8. Notice the XSS execution <img width=\"1491\" height=\"568\" alt=\"xss-execution-in-dashboard\" src=\"https://github.com/user-attachments/assets/84e8b121-30b9-4029-93be-e90009b6897e\" />\n\n\n---\n## Technical Details\n\n**File:** `vendor/craftcms/commerce/src/templates/_components/widgets/orders/recent/body.twig`\n\n**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\" />\n\n---\n## Mitigation\nUse `Craft.escapeHtml()` in the callback:\n```javascript\ncallback: function(value) {\n    return '<span class=\"commerceStatusLabel\"><span class=\"status ' + Craft.escapeHtml(value.color) + '\"></span>' + Craft.escapeHtml(value.name) + '</span>';\n}\n```\n\n## Resources:\n\nhttps://github.com/craftcms/commerce/commit/d94d1c9832a47a1c383e375ae87c46c13935ba65","format":"markdown","source":"ghsa"},{"lang":"es","text":"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, existe una vulnerabilidad de XSS DOM almacenado en el widget del panel de control 'Pedidos Recientes'. El Nombre del Estado del Pedido se renderiza mediante concatenación de cadenas de JavaScript sin el escape adecuado, lo que permite la ejecución de scripts cuando cualquier administrador visita el panel de control. Este problema ha sido parcheado en las versiones 4.10.1 y 5.5.2.","source":"nvd"}],"published":"2026-02-02T22:41:44.000Z","modified":"2026-06-17T10:24:42.680Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 5.0.0, < 5.5.2","status":"affected"},{"version":">= 4.0.0-RC1, < 4.10.1","status":"affected"}],"vendor":"craftcms","product":"commerce","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.5.2"}],"ecosystem":"Packagist","package":"craftcms/commerce","purl":"pkg:composer/craftcms/commerce","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0-RC1","status":"affected","fixed":"4.10.1"}],"ecosystem":"Packagist","package":"craftcms/commerce","purl":"pkg:composer/craftcms/commerce","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.0.1","fixed":"4.10.1"},{"status":"affected","introduced":"5.0.0","fixed":"5.5.2"},{"status":"affected","version":"4.0.0"},{"status":"affected","version":"4.0.0"}],"vendor":"craftcms","product":"craft_commerce","cpe":"cpe:2.3:a:craftcms:craft_commerce:*:*:*:*:*:craft_cms:*:*","source":"nvd"}],"references":[{"url":"https://github.com/craftcms/commerce/security/advisories/GHSA-frj9-9rwc-pw9j","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/commerce/commit/d94d1c9832a47a1c383e375ae87c46c13935ba65","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/commerce/releases/tag/4.10.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/commerce/releases/tag/5.5.2","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25482","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/commerce","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-04T15:46:23.936Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25482","url":"https://www.cve.org/CVERecord?id=CVE-2026-25482","licence":"CVE Terms of Use","modified":"2026-02-04T16:51:24.031Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-frj9-9rwc-pw9j","url":"https://github.com/advisories/GHSA-frj9-9rwc-pw9j","licence":"CC-BY-4.0","modified":"2026-02-03T21:50:01.970Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25482","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25482","licence":"Public domain","modified":"2026-06-17T10:24:42.680Z"}],"updatedAt":"2026-11-25T22:59:13.414Z","epss":{"score":0.00345,"percentile":0.3008,"date":"2026-12-02T12:00:21.000Z"}}