CSRF vulnerability that allows user account takeover.
All applications using any version of the frontend component of spree_auth_devise are affected if protect_from_forgery method is both:
That means that applications that haven't been configured differently from what it's generated with Rails aren't affected.
Thanks @waiting-for-dev for reporting and providing a patch 👏
Spree 4.3 users should update to spreeauthdevise 4.4.1 Spree 4.2 users should update to spreeauthdevise 4.2.1 Spree 4.1 users should update to spreeauthdevise 4.1.1 Older Spree version users should update to spreeauthdevise 4.0.1
If possible, change your strategy to :exception:
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end
Add the following toconfig/application.rbto at least run the :exception strategy on the affected controller:
config.after_initialize do
Spree::UsersController.protect_from_forgery with: :exception
end
https://github.com/solidusio/solidusauthdevise/security/advisories/GHSA-xm34-v85h-9pg2
{
"nvd_published_at": "2021-11-17T20:15:00Z",
"severity": "CRITICAL",
"github_reviewed_at": "2021-11-17T21:07:45Z",
"github_reviewed": true,
"cwe_ids": [
"CWE-352"
]
}