CVE-2026-32272: Craft Commerce: Blind SQL Injection via hasVariant/hasProduct

Published Apr 13, 2026
·
Updated

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]=INJECTEDSQL.

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

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
Pixel & Tonic Craft Commerce>=5.0.0<=5.5.4
composer/craftcms/commerce>=5.0.0<5.6.0
5.6.0

Event History

Apr 13, 2026
CVE Published
via MITRE·08:25 PM
Data Sourced
via MITRE·08:25 PM
DescriptionWeakness
Data Sourced
via NVD·09:16 PM
DescriptionSeverityWeakness
Apr 14, 2026
Advisory Published
via GitHub·12:06 AM
Data Sourced
via GitHub·12:06 AM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-32272?

CVE-2026-32272 is classified as a high-severity vulnerability due to its potential for exploitation via blind SQL injection.

2

How do I fix CVE-2026-32272?

To fix CVE-2026-32272, upgrade Craft Commerce to version 5.5.5 or later, where the vulnerability has been addressed.

3

What versions of Craft Commerce are affected by CVE-2026-32272?

CVE-2026-32272 affects Craft Commerce versions from 5.0.0 to 5.5.4.

4

What are the consequences of exploiting CVE-2026-32272?

Exploiting CVE-2026-32272 could allow an attacker to execute unauthorized SQL queries on the database.

5

Is CVE-2026-32272 specific to Craft Commerce?

Yes, CVE-2026-32272 is specifically a vulnerability within the Craft Commerce platform.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203