The vulnerability is a critical 'fail-open' design flaw in the Authlib library's OpenID Connect (OIDC) implementation. The root cause is in the _verify_hash function located in authlib/oidc/core/claims.py. This function is responsible for verifying the at_hash (Access Token hash) and c_hash (Authorization Code hash) claims in an ID Token.
The vulnerability is triggered when an attacker submits an ID Token where the JWT header's alg parameter specifies a cryptographic algorithm that is not supported by the underlying hashlib library. The helper function create_half_hash correctly returns None in this scenario. However, the vulnerable version of _verify_hash checks for this condition with if not hash_value:, which evaluates to true for None, and then proceeds to return True, effectively signaling that the hash verification has passed.
This allows an attacker to completely bypass the integrity check that binds the ID Token to the Access Token or Authorization Code. The public-facing methods IDToken.validate_at_hash and HybridIDToken.validate_c_hash call the vulnerable _verify_hash function, making them the primary entry points for exploitation in an application using Authlib. The patch corrects the logic to if hash_value is None: return False, enforcing a secure 'fail-closed' behavior as required by cryptographic best practices and OIDC specifications.