The vulnerability lies in the password change functionality where a session token could be used in place of the user's old password. The core of the issue is in the OpenC3::AuthModel.set function, which is responsible for setting a new password. Before the patch, this function called OpenC3::AuthModel.verify_no_service with the no_password parameter set to false. This configuration allowed verify_no_service to validate either a password or a session token.
An attacker with a stolen session token could exploit this by calling the password change functionality and submitting the token as the old_password. The system would incorrectly accept the token, allowing the attacker to set a new password and gain persistent control over the account, locking out the legitimate user.
The patch rectifies this by replacing the boolean no_password parameter in verify_no_service with a more explicit mode parameter (:password, :token, or :any). Consequently, the set function was updated to call verify_no_service with mode: :password, ensuring that only the user's actual password can be used to authorize a password change, thus mitigating the vulnerability.