
If an app expects RS256 but accepts HS256 with the RSA public key as an HMAC secret, an attacker may be able to forge a token. CVE-2022-29217 affected PyJWT with key confusion through certain public-key formats. The fix was to prevent the public key being misused as an HMAC key.
Post summary
The text discloses technical details of CVE‑2022‑29217, a key‑confusion flaw in PyJWT that allows an attacker to forge JWT tokens by forcing the use of an RSA public key as an HMAC secret. It notes that the fix prevents misuse of the public key as an HMAC key.

