Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-2h2m-v2mg-656c
No affected components available
Summary
Stored XSS via Product Type names. The name is not sanitized when displayed in user permissions settings.
The vulnerable input (source) is in Commerce (Product Type settings), but the sink is in CMS user permissions settings. Reporting to Commerce GHSA since the input originates here.
Users are recommended to update to the patched 5.5.2 release to mitigate the issue.
Proof of Concept
Required Permissions (Attacker)
- Admin access (to edit Commerce settings)
Steps to Reproduce
- Log in as attacker with admin permissions.
- Go to Commerce -> Settings -> Product Types (
/admin/commerce/settings/producttypes). - Create a new Product Type.
- Set Name to:
<img src=x onerror="alert('XSS-ProductType')" hidden>
- Save the Product Type.
- Go to Users -> Edit any user -> Click on Permissions tab (
/admin/users/{UserID}/permissions). - Alert fires instantly (when the Product Type checkbox renders).
Resources
https://github.com/craftcms/commerce/commit/7e1dedf06038c8e70dce0187b7048d4ab8ffb75c
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs high-level or administrative privileges.
Limited exploitation activity has been observed. Close monitoring and planned remediation are recommended.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard