Guardian.revoke/3 acts on unverified token claims, allowing forged-token session revocation
ueberauth guardian
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ueberauth guardian |
| No fix yet |
| ueberauth guardian |
| No fix yet |
Original description
Improper Verification of Cryptographic Signature in ueberauth guardian allows an unauthenticated attacker to revoke a victim's session with a forged token.
Guardian.revoke/3 in lib/guardian.ex decodes the supplied token with peek/1, which performs no signature verification (it only base64-decodes the JWT header and payload). The resulting unverified claims are forwarded directly to the configured token module's revoke callback and the implementation's on_revoke callback, a state-mutating sink. The sibling operations refresh/2 and exchange/4 both call decode_and_verify first, so the signature is checked before anything acts on the claims; revoke/3 is the only state-mutating path that acts on claims without verifying the signature.