CVE-2026-29176: Craft Commerce has stored XSS in Inventory Location Name
Summary A stored XSS vulnerability exists in the Commerce Settings - Inventory Locations page. The Name field is rendered without proper HTML escaping, allowing an attacker to execute arbitrary JavaScript. This XSS triggers when an administrator (or user with product editing permissions) creates or edits a variant product.
Published Mar 10, 2026
Affected packages
craftcms/commerce
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0, <= 5.5.2
- Fixed in
- 5.5.3
- Check
composer show craftcms/commerce
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A stored XSS vulnerability exists in the Commerce Settings - Inventory Locations page. The Name field is rendered without proper HTML escaping, allowing an attacker to execute arbitrary JavaScript.
This XSS triggers when an administrator (or user with product editing permissions) creates or edits a variant product.
Proof of Concept
Permissions Required
- General
- Access the control panel
- Access Craft Commerce
- Craft Commerce
- Manage inventory locations
Steps to Reproduce
- Log in to the control panel
- Navigate to Commerce → Inventory Locations
- Create or edit a location
- Set Name to the following payload: ```html
5. Save the location
6. Navigate to **Commerce → Products** and click "New Product" and click "New product variant"
7. The Inventory Location table loads, rendering the **Inventory Location Name**
8. XSS executes
## Impact
- Potential Session Hijacking
- Potential Database Exfiltration
- Potential Account Takeover by forcing a password change on the victim’s account.
- Potential Privilege escalation, or creating new admin users.
## Mitigation
Sanitize the inventory location name field when rendering in the "Track Inventory" table.Credited to mHe4am.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-55795
Craft Commerce: Coupon Code Brute-Force via Rate Limit Bypass
medium6.9Jun 19, 2026GHSA-78vr-q6cf-c7p6
Craft Commerce: Partial Payment Amount Without Lower Bound Validation
medium6.9Jun 19, 2026CVE-2026-32270
Craft Commerce has an unauthenticated information disclosure that can leak some customer order data on anonymous payments
low1.7Apr 14, 2026CVE-2026-32271
Craft Commerce has a SQL Injection can lead to Remote Code Execution via TotalRevenue Widget
high8.7Apr 14, 2026CVE-2026-32272
Craft Commerce hasVariant/hasProduct Blind SQL Injection
high8.7Apr 14, 2026CVE-2026-29172
Craft Commerce is Vulnerable to SQL Injection in Commerce Purchasables Table Sorting
high8.7Mar 10, 2026
