CVE-2023-41879
📋 TL;DR
This vulnerability allows unauthenticated attackers to view guest orders in Magento LTS by brute-forcing a 6-character hexadecimal 'protect_code' value stored in a 'guest-view' cookie. All Magento LTS installations running vulnerable versions are affected, potentially exposing customer order information including personal and payment details.
💻 Affected Systems
- OpenMage Magento LTS
📦 What is this software?
Magento by Openmage
Magento by Openmage
⚠️ Risk & Real-World Impact
Worst Case
Attackers could systematically brute-force all guest order protect codes, exposing all guest order data including customer names, addresses, phone numbers, email addresses, and potentially partial payment information.
Likely Case
Targeted attacks against specific guest orders to harvest customer personal information for phishing, fraud, or identity theft purposes.
If Mitigated
With proper rate limiting and monitoring, brute-force attempts would be detected and blocked before significant data exposure occurs.
🎯 Exploit Status
The exploit requires brute-forcing a 6-character hexadecimal code (16^6 = 16,777,216 possibilities), which is feasible with automated tools. Each order requires separate brute-force attempts.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 19.5.1 or 20.1.1
Vendor Advisory: https://github.com/OpenMage/magento-lts/security/advisories/GHSA-9358-cpvx-c2qp
Restart Required: No
Instructions:
1. Backup your Magento installation and database. 2. Update to version 19.5.1 (for Magento 1.x) or 20.1.1 (for Magento 2.x) using composer: 'composer require openmage/magento-lts:19.5.1' or 'composer require openmage/magento-lts:20.1.1'. 3. Clear cache: 'php bin/magento cache:clean' (Magento 2) or delete var/cache/* (Magento 1). 4. Verify the update completed successfully.
🔧 Temporary Workarounds
Rate Limit Guest Order Access
allImplement rate limiting on guest order viewing endpoints to prevent brute-force attacks
Configure web server rate limiting (e.g., nginx: limit_req_zone $binary_remote_addr zone=guestview:10m rate=10r/m;)
Add application-level rate limiting in .htaccess or web.config
Disable Guest Checkout
allRequire customer accounts for all orders to eliminate guest order exposure
Magento Admin: Stores > Configuration > Sales > Checkout > Allow Guest Checkout > No
🧯 If You Can't Patch
- Implement strict rate limiting on /sales/guest/view/ and similar guest order endpoints
- Monitor logs for excessive requests to guest order viewing functionality and block suspicious IPs
🔍 How to Verify
Check if Vulnerable:
Check if your Magento version is below 19.5.1 (for Magento 1.x) or below 20.1.1 (for Magento 2.x). Test if guest orders can be accessed with manipulated protect_code values.
Check Version:
For Magento 1.x: check app/Mage.php version. For Magento 2.x: 'php bin/magento --version' or check composer.json
Verify Fix Applied:
After patching, verify the version is 19.5.1 or higher (Magento 1.x) or 20.1.1 or higher (Magento 2.x). Test that guest order access now requires proper authentication or uses stronger protect_code validation.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed attempts to access /sales/guest/view/ with different protect_code values
- Rapid sequential requests to guest order endpoints from single IPs
- Unusual patterns of guest order access outside normal business hours
Network Indicators:
- High volume of requests to guest order viewing URLs
- Patterns of incremental or sequential parameter values in requests
SIEM Query:
source="web_access_logs" AND (url_path="/sales/guest/view/" OR url_path="/sales/order/view/") AND status=200 | stats count by src_ip, user_agent | where count > 50
🔗 References
- https://github.com/OpenMage/magento-lts/commit/2a2a2fb504247e8966f8ffc2e17d614be5d43128
- https://github.com/OpenMage/magento-lts/commit/31e74ac5d670b10001f88f038046b62367f15877
- https://github.com/OpenMage/magento-lts/releases/tag/v19.5.1
- https://github.com/OpenMage/magento-lts/releases/tag/v20.1.1
- https://github.com/OpenMage/magento-lts/security/advisories/GHSA-9358-cpvx-c2qp
- https://github.com/OpenMage/magento-lts/commit/2a2a2fb504247e8966f8ffc2e17d614be5d43128
- https://github.com/OpenMage/magento-lts/commit/31e74ac5d670b10001f88f038046b62367f15877
- https://github.com/OpenMage/magento-lts/releases/tag/v19.5.1
- https://github.com/OpenMage/magento-lts/releases/tag/v20.1.1
- https://github.com/OpenMage/magento-lts/security/advisories/GHSA-9358-cpvx-c2qp