In short
- CVE-2026-32272 is a HIGH (CVSS 8.7) vulnerability affecting craftcms/commerce.
- Chance of exploitation in the next 30 days (EPSS): 0.30%, higher than 23.2% of all vulnerabilities.
- Fix: update to 5.6.0 or later.
| Package | Affected versions | Patched versions |
|---|
| craftcms/commerce Packagist | ≥ 5.0.0, < 5.6.0
| 5.6.0
|
Description
Overview
Craft Commerce’s ProductQuery::hasVariant and VariantQuery::hasProduct properties bypass the unset() blocklist added to ElementIndexesController in GHSA-2453-mppf-46cj.
The blocklist only strips top-level Yii2 Query properties (where, orderBy, etc.), but hasVariant and hasProduct pass
through untouched. Internally, these properties call Craft::configure() on a subquery without sanitization, re-introducing SQL injection via criteria[hasVariant][where]=INJECTED_SQL.
An authenticated control panel user can perform boolean-based blind SQL injection through the patched ElementIndexesController and extract arbitrary database contents.
Impact
- Full database read access via blind SQL injection
- Privilege escalation via security key extraction → forged admin sessions
Prerequisites
- Authenticated control panel user
- Commerce plugin installed
- Products with variants in the database
NVD description
Craft Commerce is an ecommerce platform for Craft CMS. In versions 5.0.0 through 5.5.4, an SQL injection vulnerability exists where the ProductQuery::hasVariant and VariantQuery::hasProduct properties bypass the input sanitization blocklist added to ElementIndexesController in a prior security fix (GHSA-2453-mppf-46cj). The blocklist only strips top-level Yii2 Query properties such as where and orderBy, but hasVariant and hasProduct pass through untouched and internally call Craft::configure() on a subquery without sanitization, re-introducing SQL injection. Any authenticated control panel user can exploit this via boolean-based blind SQL injection to extract arbitrary database contents, including security keys that enable forging admin sessions for privilege escalation. This issue has been fixed in version 5.6.0.
More vulnerabilities in craftcms/commerce
See all →Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free