The vulnerability (CVE-2024-33663) in python-jose < 3.4.0 is an algorithm confusion issue. It occurs when jose.jwt.decode is called without an explicit algorithms parameter. This allows an attacker to use an asymmetric public key (like an OpenSSH ECDSA key) as a secret for an HMAC symmetric algorithm (e.g., HS256) if the token's header specifies such an algorithm. The root cause was an insufficient blacklist (invalid_strings) in the __init__ methods of jose.backends.cryptography_backend.CryptographyHMACKey and jose.backends.native.NativeHMACKey. This blacklist failed to identify all types of public keys, allowing them to be misused as HMAC secrets. The fix, introduced in commit 12f30c8c87b343ad4f9e27e8b5b9e0ef7d665cb3, replaced this blacklist with more robust checks using new utility functions is_pem_format and is_ssh_key.
The primary user-facing function involved is jose.jwt.decode. During exploitation, this function would call into the vulnerable __init__ methods of the backend HMACKey classes, which contained the flawed validation logic. Therefore, these three functions would appear in a runtime profile when the vulnerability is triggered.