CVE-2026-29172: Craft Commerce is Vulnerable to SQL Injection in Commerce Purchasables Table Sorting
Craft Commerce is vulnerable to SQL Injection in the purchasables table endpoint. The sort parameter is split by | and the first part (column name) is passed directly as an array key to orderBy() without whitelist validation. Yii2’s query builder does NOT escape array keys, allowing an authenticated attacker to inject arbitrary SQL into the ORDER BY clause.
References
- github.com/advisories/GHSA-j3x5-mghf-xvfw
- github.com/craftcms/commerce
- github.com/craftcms/commerce/commit/b231b920b73db023e81e5b261b894d73e865c276
- github.com/craftcms/commerce/commit/e4e0f4107cd895d29290523637f077fe280407b1
- github.com/craftcms/commerce/security/advisories/GHSA-j3x5-mghf-xvfw
- nvd.nist.gov/vuln/detail/CVE-2026-29172
Code Behaviors & Features
Detect and mitigate CVE-2026-29172 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →