The analysis of the security advisory and the associated patch commit dc8eaa16a8550f885614655f14b6fd9fe429b278 confirms the presence of a Server-Side Request Forgery (SSRF) vulnerability. The root cause is the lack of validation of the user-supplied ha_url parameter in the OAuth consent flow.
The primary vulnerable function was HomeAssistantOAuthProvider._validate_ha_credentials in src/ha_mcp/auth/provider.py, which made a direct HTTP request to the provided URL. This function was called by HomeAssistantOAuthProvider._consent_post after a user submitted the consent form. The patch completely removes the _validate_ha_credentials function and the ha_url input field from the consent form, now requiring the Home Assistant URL to be configured on the server-side.
Additionally, the vulnerability could be triggered in REST and WebSocket tool calls by using a forged OAuth token containing a malicious ha_url. The OAuthProxyClient._get_oauth_client function in src/ha_mcp/__main__.py was responsible for creating API clients using this user-controlled URL. The patch mitigates this by using the server-configured URL instead of the one from the token claims. The function create_consent_html is also identified as it was responsible for rendering the vulnerable input field.