{"id":"CVE-2026-25485","aliases":["CVE-2026-25485","GHSA-w8gw-qm8p-j9j3"],"related":[],"kind":"vulnerability","state":"published","title":"Craft Commerce has Stored XSS in Shipping Categories (Name & Description) Fields Leading to Potential Privilege Escalation","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 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.","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 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.","source":"cvelist"},{"lang":"en","text":"## Summary\nA 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.\n\n---\n## Proof of Concept\n\n### Requirments\n- General permissions:\n\t- Access the control panel\n\t- Access Craft Commerce\n- Craft Commerce permissions:\n\t- Manage store settings\n\t- Manage shipping\n- An active administrator elevated session\n\n### Steps to Reproduce\n\n1. Log in to the Admin Panel with the attacker account with the permissions mentioned above.\n2. Navigate to **Commerce** -> **Store Management** -> **Shipping Categories** (`/admin/commerce/store-management/primary/shippingcategories`).\n3. Create a new shipping category.\n4. In the **Name** field, enter the following payload:\n```html\n<img src=x onerror=\"alert(document.domain)\">\n```\n4. Click **Save** & Go back to the previous page.\n5. Notice the alert proving JavaScript execution.\n\n\n### Privilege Escalation to Administrator:\n\n1. Do the same steps above, but replace the payload with a malicious one.\n2. The following payload elevates the attacker’s account to Admin if there’s already an elevated session, replace the `<UserID>` with your attacker id:\n```html\n<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'}})\">\n```\n3. In another browser, log in as an admin & go to the vulnerable page (shipping categories page).\n4. Go back to your attacker account & notice you are now an admin.\n\nThe 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.\n\nOr 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.\n\n### Resources:\n\nhttps://github.com/craftcms/commerce/commit/fa273330807807d05b564d37c88654cd772839ee","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, 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.","source":"nvd"}],"published":"2026-02-02T22:45:03.000Z","modified":"2026-06-17T10:24:43.040Z","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":">= 4.0.0-RC1, < 4.10.1","status":"affected"},{"version":">= 5.0.0, < 5.5.2","status":"affected"}],"vendor":"craftcms","product":"commerce","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0-RC1","status":"affected","fixed":"5.5.2"}],"ecosystem":"Packagist","package":"craftcms/composer","purl":"pkg:composer/craftcms/composer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0-RC1","status":"affected","fixed":"4.10.1"}],"ecosystem":"Packagist","package":"craftcms/composer","purl":"pkg:composer/craftcms/composer","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-w8gw-qm8p-j9j3","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/commerce/commit/fa273330807807d05b564d37c88654cd772839ee","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-25485","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:17.061Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25485","url":"https://www.cve.org/CVERecord?id=CVE-2026-25485","licence":"CVE Terms of Use","modified":"2026-02-04T16:51:07.751Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w8gw-qm8p-j9j3","url":"https://github.com/advisories/GHSA-w8gw-qm8p-j9j3","licence":"CC-BY-4.0","modified":"2026-02-22T23:26:11.265Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25485","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25485","licence":"Public domain","modified":"2026-06-17T10:24:43.040Z"}],"updatedAt":"2026-11-25T22:59:13.416Z","epss":{"score":0.00297,"percentile":0.241,"date":"2026-12-01T12:00:22.000Z"}}