SQL Injection Affecting craftcms/commerce package, versions >=4.0.0, <5.6.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

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-16044516
  • published14 Apr 2026
  • disclosed13 Apr 2026
  • creditRajChowdhury240, rlarabee

Introduced: 13 Apr 2026

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

How to fix?

Upgrade craftcms/commerce to version 5.6.0 or higher.

Overview

craftcms/commerce is a Craft Commerce

Affected versions of this package are vulnerable to SQL Injection via the TotalRevenue widget, where unsanitized widget settings are interpolated into SQL expressions. An attacker can execute arbitrary commands on the server by injecting a maliciously serialized PHP object into the queue table, which is then processed by an unrestricted unserialize() call, leading to the instantiation of a gadget chain that writes a webshell to the server's webroot. This can be achieved through a multi-step exploitation chain requiring only authenticated control panel access and leveraging an unauthenticated endpoint to trigger queue processing.

CVSS Base Scores

version 4.0
version 3.1