CVE-2026-31867: Craft Commerce has a Potential IDOR in Commerce carts

Published Mar 10, 2026
·
Updated

An Insecure Direct Object Reference (IDOR) vulnerability exists in Craft Commerce’s cart functionality that allows users to hijack any shopping cart by knowing or guessing its 32-character number. This vulnerability enables the takeover of shopping sessions and potential exposure of PII.

Vulnerability Details

Root Cause

The CartController accepts a user-supplied number parameter to load and modify shopping carts. No ownership validation is performed - the code only checks if the order exists and is incomplete, not whether the requester has authorization to access it.

php // CartController.php:374-389 - actionLoadCart() public function actionLoadCart(): ?Response { $number = $this->request->getParam('number');

if ($number === null) { return $this->asFailure(Craft::t('commerce', 'A cart number must be specified.')); }

// No ownership check - returns any cart to any requester $cart = Order::find()->number($number)->isCompleted(false)->one();

// Cart is loaded into attacker's session without authorization ... }

php // CartController.php:606-616 - getCart() $orderNumber = $this->request->getBodyParam('number'); if ($orderNumber) { // Same issue - no ownership validation $cart = Order::find()->number($orderNumber)->isCompleted(false)->one(); // Returns cart to any requester who knows the number } ---

Attack Scenario

Prerequisites - Target Craft Commerce installation with active shopping carts - Knowledge of a victim’s cart number (32-character hex string)

Cart Number Acquisition Vectors

1. Referrer Header Leakage: Cart URLs shared externally expose the number 2. Browser History: Accessible on shared/compromised devices 3. Proxy/WAF Logs: Cart numbers logged in URL parameters 4. Social Engineering: Support tickets, screenshots containing cart URLs 5. Brute Force: While impractical for random targeting, feasible for targeted attacks against recently-created carts

---

Other sources

Craft Commerce is an ecommerce platform for Craft CMS. Prior to 4.11.0 and 5.6.0, An Insecure Direct Object Reference (IDOR) vulnerability exists in Craft Commerce’s cart functionality that allows users to hijack any shopping cart by knowing or guessing its 32-character number. The CartController accepts a user-supplied number parameter to load and modify shopping carts. No ownership validation is performed - the code only checks if the order exists and is incomplete, not whether the requester has authorization to access it. This vulnerability enables the takeover of shopping sessions and potential exposure of PII. This vulnerability is fixed in 4.11.0 and 5.6.0.

MITRE

Affected Software

4 affected componentsFixes available
composer/craftcms/commerce>=4.0.0<4.11.0
4.11.0
composer/craftcms/commerce>=5.0.0<5.6.0
5.6.0
CraftCMS Craft Commerce Craft Cms>=4.0.0<4.11.0
CraftCMS Craft Commerce Craft Cms>=5.0.0<5.6.0

Event History

Mar 10, 2026
Advisory Published
via GitHub·06:24 PM
Data Sourced
via GitHub·06:24 PM
DescriptionWeaknessAffected Software
Mar 11, 2026
CVE Published
via MITRE·05:52 PM
Data Sourced
via MITRE·05:52 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
RemedyAffected Software
Nov 21, 58180
Event
via FIRST·12:23 AM
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-31867?

CVE-2026-31867 is classified as a high severity vulnerability due to its potential for exploitation in cart hijacking.

2

How do I fix CVE-2026-31867?

To remediate CVE-2026-31867, update Craft Commerce to version 4.11.0 or 5.6.0, depending on your current version.

3

What does CVE-2026-31867 exploit?

CVE-2026-31867 exploits an Insecure Direct Object Reference (IDOR) in the cart functionality of Craft Commerce.

4

Who is affected by CVE-2026-31867?

Users of Craft Commerce versions between 4.0.0 and 4.11.0, and 5.0.0 to 5.6.0 are affected by CVE-2026-31867.

5

What are the consequences of CVE-2026-31867?

The consequences of CVE-2026-31867 include unauthorized access and the ability to hijack shopping carts, compromising user transactions.

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