VYPR
High severityNVD Advisory· Published Apr 13, 2026· Updated Apr 17, 2026

CVE-2026-32271

CVE-2026-32271

Description

Craft Commerce is an ecommerce platform for Craft CMS. In versions 4.0.0 through 4.10.2 and 5.0.0 through 5.5.4, there is an SQL injection vulnerability in the Commerce TotalRevenue widget which allows any authenticated control panel user to achieve remote code execution through a four-step exploitation chain. The attack exploits unsanitized widget settings interpolated into SQL expressions, combined with PDO's default multi-statement query support, to inject a maliciously serialized PHP object into the queue table. When the queue consumer processes the injected job, the unrestricted unserialize() call in yii2-queue instantiates a GuzzleHttp FileCookieJar gadget chain whose __destruct() method writes a PHP webshell to the server's webroot. The complete chain requires only three HTTP requests, no administrative privileges, and results in arbitrary command execution as the PHP process user, with queue processing triggered via an unauthenticated endpoint. This issue has been fixed in versions 4.10.3 and 5.5.5.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
craftcms/commercePackagist
>= 4.0.0, < 4.10.34.10.3
craftcms/commercePackagist
>= 5.0.0, < 5.5.55.5.5

Affected products

1

Patches

1
6d2d24b3a2b0

Fixed SQL query

https://github.com/craftcms/commerceLuke HolderFeb 25, 2026via ghsa
3 files changed · +17 0
  • CHANGELOG.md+1 0 modified
    @@ -4,6 +4,7 @@
     
     - Improved product index performance by not eager-loading variants for table attributes that are already fetched via SQL joins. ([#4236](https://github.com/craftcms/commerce/issues/4236))
     - Fixed a bug where coupon codes would be automatically submitted too soon while entering them on order edit screens.
    +- Fixed a [high-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) SQL injection vulnerability in the control panel. (cnv_igxrft5)
     
     ## 5.5.4 - 2026-02-18
     
    
  • src/stats/TotalRevenue.php+5 0 modified
    @@ -44,6 +44,11 @@ class TotalRevenue extends Stat
          */
         public function getData(): ?array
         {
    +        $allowedTypes = [self::TYPE_TOTAL, self::TYPE_TOTAL_PAID];
    +        if (!in_array($this->type, $allowedTypes, true)) {
    +            $this->type = self::TYPE_TOTAL;
    +        }
    +
             return $this->_createChartQuery(
                 [
                     new Expression(sprintf('SUM([[%s]]) as revenue', $this->type)),
    
  • src/widgets/TotalRevenue.php+11 0 modified
    @@ -52,6 +52,17 @@ class TotalRevenue extends Widget
          */
         private TotalRevenueStat $_stat;
     
    +    /**
    +     * @inheritdoc
    +     */
    +    protected function defineRules(): array
    +    {
    +        $rules = parent::defineRules();
    +        $rules[] = [['type'], 'in', 'range' => [TotalRevenueStat::TYPE_TOTAL, TotalRevenueStat::TYPE_TOTAL_PAID]];
    +
    +        return $rules;
    +    }
    +
         /**
          * @inheritDoc
          */
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

11