JWT Attacks: alg=none, Key Confusion & kid Injection (+ RFC 8725 Checklist)

Overview JWT bugs in 2026 (checked November 29, 2026). Two recent ones show the same mistakes from this guide still turning up in mainstream libraries: CVE-2026-107722, fast-jwt 6.2.0–6.2.4 (CVSS 9.8). The earlier fix for RS256→HS256 key confusion trimmed whitespace before looking for the PEM header and nothing else. Put a control character or a zero-width character in front of the key and the check misses it, so the RSA public key gets used as the HMAC secret again. Fixed in 6.3.0. That’s section 3, one patch later. CVE-2026-96760, Authlib ≤ 1.8.0 (CVSS 9.1). JsonWebSignature.deserialize_json() marks the token valid and then loops over signatures. Send an empty array, the loop never runs, and the payload comes back “verified” without any signature or key ever being checked. Fixed in 1.9.0. If you pin either library, check the version before you trust anything below. ...

April 10, 2026 · Updated November 29, 2026 · 18 min · Carl Sampson