Example 1: Sensitive Information Disclosure: Demonstrates how sensitive data (e.g., password hash, flag) can be exposed if included in JWT claims.
Example 2: Not Verifying the Signature: Shows how disabling signature verification allows forging JWTs and modifying claims.
Example 3: Downgrading to None: Demonstrates how changing the algorithm to None can bypass signature verification.
Example 4: Weak Symmetric Secrets: Shows how weak secrets can be cracked offline, allowing attackers to forge JWTs.
Example 5: Algorithm Confusion: Demonstrates how downgrading from an asymmetric to a symmetric algorithm can lead to signature bypass if the library uses the public key as the secret.
Example 6: Token Lifetime: Shows the risk of not setting an expiration time (exp claim) for JWTs.
Example 7: Cross-Service Misconfiguration: Demonstrates a cross-service relay attack where a JWT intended for one application is used to gain unauthorized access to another application.