Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. craftcms/commerce
  4. ›
  5. CVE-2026-29172

CVE-2026-29172: Craft Commerce is Vulnerable to SQL Injection in Commerce Purchasables Table Sorting

March 10, 2026

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 →

Affected versions

All versions starting from 4.0.0 before 4.10.2, all versions starting from 5.0.0 before 5.5.3

Fixed versions

  • 4.10.2
  • 5.5.3

Solution

Upgrade to versions 4.10.2, 5.5.3 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

packagist/craftcms/commerce/CVE-2026-29172.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 25 Mar 2026 00:17:05 +0000.