Skip to content
Heist/ feed
Back to feed
High

Craft Commerce has a SQL Injection in Commerce Purchasables Table Sorting

Type: advisorySources: OSV

Craft Commerce is an ecommerce platform for Craft CMS. Prior to 4.10.2 and 5.5.3, 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. This vulnerability is fixed in 4.10.2 and 5.5.3.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-29172
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 03:48 UTC · Revision 1

Source evidence

Craft Commerce has a SQL Injection in Commerce Purchasables Table Sorting

core-osv · Original source

Published 10 Mar 2026, 19:52 UTC

Craft Commerce is an ecommerce platform for Craft CMS. Prior to 4.10.2 and 5.5.3, 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. This vulnerability is fixed in 4.10.2 and 5.5.3.

osv:CVE-2026-29172
Complete source record
{
  "id": "ff96ee06f13f0d436573dea1f5680293e12db541cdb4fa41973911fd6aa85075",
  "url": "https://osv.dev/vulnerability/CVE-2026-29172",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Craft Commerce has a SQL Injection in Commerce Purchasables Table Sorting",
    "summary": "Craft Commerce is an ecommerce platform for Craft CMS. Prior to 4.10.2 and 5.5.3, 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. This vulnerability is fixed in 4.10.2 and 5.5.3.",
    "evidence": "osv:CVE-2026-29172",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-29172",
      "aliases": [
        "CVE-2026-29172",
        "GHSA-j3x5-mghf-xvfw"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/craftcms/commerce",
              "type": "GIT",
              "events": [
                {
                  "introduced": "03fe68b8a09d05b028c510411b55af6cea6a089a"
                },
                {
                  "fixed": "1a8afefa20ab87fe52c1da5fe347d2549b0d358d"
                },
                {
                  "introduced": "266ccfd800264c4a0a7c22447112c097b0af7bae"
                },
                {
                  "fixed": "00debfb9b25ac0885cb0193dcb6ef4aba0c9e07e"
                },
                {
                  "fixed": "b231b920b73db023e81e5b261b894d73e865c276"
                },
                {
                  "fixed": "e4e0f4107cd895d29290523637f077fe280407b1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:craftcms:craft_commerce:*:*:*:*:*:craft_cms:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.10.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:craftcms:craft_commerce:*:*:*:*:*:craft_cms:*:*",
                    "range": [
                      {
                        "introduced": "5.0.0"
                      },
                      {
                        "fixed": "5.5.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b231b920b73db023e81e5b261b894d73e865c276"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e4e0f4107cd895d29290523637f077fe280407b1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "5.5.2",
            "5.5.1",
            "5.5.0.1",
            "5.5.0",
            "5.4.10",
            "5.4.9",
            "5.4.8",
            "5.4.7.1",
            "5.4.7",
            "5.4.6",
            "5.4.5.1",
            "5.4.5",
            "5.4.4",
            "5.4.3",
            "5.4.2",
            "5.4.1.1",
            "5.4.1",
            "5.4.0",
            "5.3.13",
            "5.3.12",
            "5.3.11",
            "5.3.10",
            "5.3.8",
            "5.3.7",
            "5.3.6",
            "5.3.5",
            "5.3.4",
            "5.3.3",
            "5.3.2.2",
            "5.3.2.1",
            "5.3.2",
            "5.3.1",
            "5.3.0.2",
            "5.3.0.1",
            "5.3.0",
            "5.2.12.1",
            "5.2.12",
            "5.2.11",
            "5.2.10",
            "5.2.9.1",
            "5.2.9",
            "5.2.8",
            "5.2.5",
            "5.2.4",
            "5.2.3",
            "5.2.2.1",
            "5.2.2",
            "5.2.1",
            "5.2.0",
            "5.1.4",
            "5.1.3",
            "5.1.2",
            "5.1.0.1",
            "5.1.0",
            "5.0.19",
            "5.0.18",
            "5.0.17",
            "5.0.16.2",
            "5.0.16.1",
            "5.0.16",
            "5.0.15",
            "5.0.14",
            "5.0.11",
            "5.0.13",
            "5.0.12.1",
            "5.0.12",
            "5.0.11.1",
            "5.0.10.1",
            "5.0.10",
            "5.0.9",
            "5.0.8",
            "5.0.7",
            "5.0.6",
            "5.0.5",
            "5.0.4",
            "5.0.3",
            "5.0.2",
            "5.0.1",
            "5.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-29172.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.656837565Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/29xxx/CVE-2026-29172.json",
        "https://github.com/craftcms/commerce/security/advisories/GHSA-j3x5-mghf-xvfw",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-29172",
        "https://github.com/craftcms/commerce/commit/b231b920b73db023e81e5b261b894d73e865c276",
        "https://github.com/craftcms/commerce/commit/e4e0f4107cd895d29290523637f077fe280407b1"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-89"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": ">= 4.0.0 < 4.10.2"
                  },
                  {
                    "last_affected": ">= 4.0.0 < 4.10.2"
                  },
                  {
                    "introduced": ">= 5.0.0 < 5.5.3"
                  },
                  {
                    "last_affected": ">= 5.0.0 < 5.5.3"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandaloneSingleVersion"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/29xxx/CVE-2026-29172.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-29172",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 517880,
  "published_at": "2026-03-10T19:52:32.735+00:00"
}