SQL Injection Affecting craftcms/commerce package, versions >=4.0.0-beta.1, <4.10.2>=5.0.0-beta.1, <5.5.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.03% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-CRAFTCMSCOMMERCE-15457652
  • published11 Mar 2026
  • disclosed10 Mar 2026
  • creditHesham

Introduced: 10 Mar 2026

NewCVE-2026-29172  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade craftcms/commerce to version 4.10.2, 5.5.3 or higher.

Overview

craftcms/commerce is a Craft Commerce

Affected versions of this package are vulnerable to SQL Injection in the sort parameter of the purchasables table endpoint, which is split and the first part is used directly as an array key to orderBy() without whitelist validation. An attacker can execute arbitrary SQL statements in the ORDER BY clause by manipulating the sort parameter. This can allow exfiltration, modification, or destruction of data by sending crafted requests to the endpoint. This is only exploitable if the attacker has access to the control panel with permissions to manage and edit orders.

CVSS Base Scores

version 4.0
version 3.1