During some penetration tests we found that the gem seems to be vulnerable to CSRF attacks when the forgery protection strategy is set to :null_session or :reset_session.
The problem seems to be related to Devise::InvitationsController
def current_inviter
@current_inviter ||= authenticate_inviter!
end
The value is memoized before the session is checked, so the session is cleaned but the current inviter remains memoized.
In our application we overridden this method with
def current_inviter
@current_inviter = authenticate_inviter!
end
and the problems seems to be solved.