Medium

Craft Commerce has Stored XSS in Product Type Name

  • Disclosed: 02.02.2026
  • Updated: 11.10.2026 10:22

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

  1. Log in as attacker with admin permissions.
  2. Go to Commerce -> Settings -> Product Types (/admin/commerce/settings/producttypes).
  3. Create a new Product Type.
  4. Set Name to:
html
<img src=x onerror="alert('XSS-ProductType')" hidden>
  1. Save the Product Type.
  2. Go to Users -> Edit any user -> Click on Permissions tab (/admin/users/{UserID}/permissions).
  3. Alert fires instantly (when the Product Type checkbox renders).

Resources

https://github.com/craftcms/commerce/commit/7e1dedf06038c8e70dce0187b7048d4ab8ffb75c

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package craftcms/commerce >= 5.0.0, < 5.5.2, >= 4.0.0-RC1, < 4.10.1 5.5.2, 4.10.1

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness (CWE)
CWE-79
Platform
Composer
Package
craftcms/commerce
Disclosed
02.02.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-2h2m-v2mg-656c - CC BY 4.0

Vulnerability history: craftcms/commerce

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (21) in the archive
Total entries
21
First → latest
02.2026 06.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 5
  • Medium 13
  • Low 3

Disclosures per year

  1. 2026: 21
Severity:
  1. High CVE-2026-32271 >= 4.0.0, < 4.10.3, >= 5.0.0, < 5.5.5 4.10.3, 5.5.5
  2. High CVE-2026-32272 >= 5.0.0, < 5.6.0 5.6.0
  3. High CVE-2026-29172 >= 4.0.0, < 4.10.2, >= 5.0.0, < 5.5.3 4.10.2, 5.5.3
  4. Craft Commerce has Stored XSS in Product Type Name this entry
    Medium CVE-2026-25484 >= 5.0.0, < 5.5.2, >= 4.0.0-RC1, < 4.10.1 5.5.2, 4.10.1

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.