CVE-2021-41274
📋 TL;DR
CVE-2021-41274 is a CSRF vulnerability in solidus_auth_devise that allows attackers to take over user accounts by tricking authenticated users into submitting malicious requests. All applications using the frontend component of solidus_auth_devise with default or specific CSRF protection configurations are affected. This vulnerability enables complete account compromise.
💻 Affected Systems
- solidus_auth_devise
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete account takeover of any user, including administrators, leading to data theft, privilege escalation, and full system compromise.
Likely Case
Attacker takes over customer accounts to steal personal information, payment details, and make unauthorized purchases.
If Mitigated
No impact when proper CSRF protection with :exception strategy is implemented or when patched to version 2.5.4.
🎯 Exploit Status
Exploitation requires tricking authenticated users into visiting malicious pages. No authentication needed for the victim beyond being logged in.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.5.4
Vendor Advisory: https://github.com/solidusio/solidus_auth_devise/security/advisories/GHSA-xm34-v85h-9pg2
Restart Required: Yes
Instructions:
1. Update Gemfile to require 'solidus_auth_devise', '~> 2.5.4' 2. Run 'bundle update solidus_auth_devise' 3. Restart application server
🔧 Temporary Workarounds
Change CSRF protection strategy
allModify protect_from_forgery to use :exception strategy instead of default :null_session
In application_controller.rb: protect_from_forgery with: :exception
🧯 If You Can't Patch
- Implement additional CSRF tokens in all forms and AJAX requests
- Deploy WAF rules to block CSRF patterns and monitor for suspicious account modification requests
🔍 How to Verify
Check if Vulnerable:
Check Gemfile.lock for solidus_auth_devise version < 2.5.4 and verify protect_from_forgery configuration in application controller
Check Version:
grep solidus_auth_devise Gemfile.lock
Verify Fix Applied:
Confirm solidus_auth_devise version is 2.5.4+ in Gemfile.lock and test CSRF protection with security scanning tools
📡 Detection & Monitoring
Log Indicators:
- Multiple account modification requests from same IP with different user agents
- Account updates without corresponding CSRF token validation in logs
Network Indicators:
- POST requests to user endpoints without Referer headers or with external Referers
- Unusual account modification patterns
SIEM Query:
source=web_logs (POST /user/* OR PUT /user/*) AND NOT csrf_token=* | stats count by src_ip
🔗 References
- https://github.com/solidusio/solidus_auth_devise/commit/731a6645e90ea9fd228f78ec53c6976c048a0555
- https://github.com/solidusio/solidus_auth_devise/security/advisories/GHSA-xm34-v85h-9pg2
- https://github.com/solidusio/solidus_auth_devise/commit/731a6645e90ea9fd228f78ec53c6976c048a0555
- https://github.com/solidusio/solidus_auth_devise/security/advisories/GHSA-xm34-v85h-9pg2