Craft Commerce has Stored XSS in Product Type Name

Description

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:
<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

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-02-02 22:44:05 UTC
Updated
2026-02-03 21:40:07 UTC
GitHub reviewed
2026-02-02 22:44:05 UTC
NVD published
2026-02-03

EPSS Score

Score Percentile
0.02% 3.59%

CVSS Scores

Base score Version Severity Vector
4.8 4.0
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 Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network.
Attack complexity (AC:L)
Exploitation conditions are straightforward and stable.
Attack requirements (AT:N)
No additional preconditions are required beyond normal reachability.
Privileges required (PR:H)
High privileges are required.
User interaction (UI:P)
A user has to participate (for example click/open/approve).
Vulnerable system confidentiality impact (VC:N)
No confidentiality impact on the vulnerable system.
Vulnerable system integrity impact (VI:N)
No integrity impact on the vulnerable system.
Vulnerable system availability impact (VA:N)
No availability impact on the vulnerable system.
Subsequent system confidentiality impact (SC:L)
Limited confidentiality impact on subsequent systems.
Subsequent system integrity impact (SI:L)
Limited integrity impact on subsequent systems.
Subsequent system availability impact (SA:N)
No availability impact on subsequent systems.

Identifiers

CWEs

CWE id Name
CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Credits

  • mHe4am (reporter)

Affected packages (2)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
composer craftcms/commerce >= 5.0.0, <= 5.5.1 5.5.2
composer craftcms/commerce >= 4.0.0-RC1, <= 4.10.0 4.10.1

References

cvelogic Threat Intelligence