The vulnerability is an open redirect in the SAML IdP initiated SSO flow in django-allauth. By analyzing the commits between the last vulnerable version (65.14.0) and the first patched version (65.14.1), a security fix was identified in the allauth/socialaccount/providers/saml/utils.py file. The commit 86fff68f7b2906237ea40b1aace5020746b1e62c specifically addresses this issue. The change is within the decode_relay_state function, which is responsible for handling the RelayState parameter from the SAML authentication response. The vulnerable version of this function directly used the RelayState value as a redirect URL without validation. The patch introduces a check using get_account_adapter().is_safe_url() to ensure the URL is safe before using it for redirection, thus mitigating the open redirect vulnerability. Therefore, the decode_relay_state function is the vulnerable function.