High severityNVD Advisory· Published Mar 10, 2026· Updated Mar 11, 2026
Multiple Stored XSS in Commerce Inventory Page Leading to Session Hijacking
CVE-2026-29175
Description
Craft Commerce is an ecommerce platform for Craft CMS. Prior to 5.5.3, Stored XSS vulnerabilities exist in the Commerce Inventory page. The Product Title, Variant Title, and Variant SKU fields are rendered without proper HTML escaping, allowing an attacker to execute arbitrary JavaScript when any user (including administrators) views the inventory management page. This vulnerability is fixed in 5.5.3.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
craftcms/commercePackagist | >= 5.0.0, < 5.5.3 | 5.5.3 |
Affected products
1Patches
11 file changed · +6 −3
src/controllers/InventoryController.php+6 −3 modified@@ -281,14 +281,17 @@ public function actionInventoryLevelsTableData(): Response $purchasable = \Craft::$app->getElements()->getElementById($inventoryLevel['purchasableId'], siteId: Cp::requestedSite()->id); $inventoryItemDomId = sprintf("edit-$id-link-%s", mt_rand()); if ($purchasable) { - $inventoryLevel['purchasable'] = Cp::chipHtml($purchasable, ['labelHtml' => $purchasable->getDescription(), 'showActionMenu' => !$purchasable->getIsDraft() && $purchasable->canSave($currentUser)]); + // When providing the `labelHtml` option we need to encode it ourselves + $inventoryLevel['purchasable'] = Cp::chipHtml($purchasable, ['labelHtml' => Html::encode($purchasable->getDescription()), 'showActionMenu' => !$purchasable->getIsDraft() && $purchasable->canSave($currentUser)]); } else { - $inventoryLevel['purchasable'] = $inventoryLevel['description']; + $inventoryLevel['purchasable'] = Html::encode($inventoryLevel['description']); } if (PurchasableHelper::isTempSku($inventoryLevel['sku'])) { $inventoryLevel['sku'] = ''; } - $inventoryLevel['sku'] = Html::tag('span', Html::a($inventoryLevel['sku'], "#", ['id' => "$inventoryItemDomId", 'class' => 'code'])); + + // Ensure encoded SKU + $inventoryLevel['sku'] = Html::tag('span', Html::a(Html::encode($inventoryLevel['sku']), "#", ['id' => "$inventoryItemDomId", 'class' => 'code'])); $inventoryLevel['id'] = $id; $view->registerJsWithVars(fn($id, $params, $inventoryLevelsManagerContainerId) => <<<JS
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-cfpv-rmpf-f624ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-29175ghsaADVISORY
- github.com/craftcms/commerce/commit/9f0638a4fb29ed8295a463385a7cc49ec986e33aghsax_refsource_MISCWEB
- github.com/craftcms/commerce/security/advisories/GHSA-cfpv-rmpf-f624ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.