NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

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

highCVSS 4.0 8.7GHSA-r54v-qq87-px5r

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.

Published Apr 14, 2026

Affected packages

craftcms/commerce

Ecosystem
Composer (PHP)
Affected
>= 5.0.0, < 5.6.0
Fixed in
5.6.0
Check
composer show craftcms/commerce

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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

Credited to Neosprings.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Composer (PHP) vulnerabilities

All Composer (PHP) entries