Registry Mirror
Skip to content

Conversation

@lakhansamani

@lakhansamani lakhansamani commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Low-severity logout CSRF, pre-existing. GET /logout skipped the confirmation page for any validly signed id_token_hint. Anyone can get a genuine ID token for their own account, so <img src="https://github.com/logout?id_token_hint=<attacker's own ID token>"> signed out every visitor.

Fix: the hint's sub must equal the signed-in session's subject; otherwise the existing confirmation page is shown (one click, POST). Behaviour for an RP sending its own user's hint, and for POST logout, is unchanged.

Found by the CIBA implementation security review (#954) — CIBA gives agents ID tokens, but the hole predates it. Public PR per the triage guidance for low-severity issues.

Verified

  • New TestLogoutGETRequiresHintForSignedInUser: another user's hint → confirmation page, victim still signed in; own hint → logged out. Fails without the fix.
  • make test (SQLite, full): pass. golangci-lint clean.

A GET /logout skipped the confirmation page whenever id_token_hint was any
validly signed ID token. Anyone can obtain a genuine ID token for their own
account, so <img src="https://github.com/logout?id_token_hint=<their token>"> signed out
every visitor. The hint's sub must now match the session's subject;
otherwise the existing confirmation page is shown. POST logout and a
matching hint are unchanged.

Found during the CIBA security review (CIBA hands agents ID tokens, but
the hole predates it). Regression test fails without the fix.
@lakhansamani
lakhansamani force-pushed the fix/logout-hint-subject branch from 81a43ef to 653eb63 Compare November 30, 2026 10:26
@lakhansamani
lakhansamani merged commit 980b534 into main Dec 1, 2026
4 checks passed
@lakhansamani
lakhansamani deleted the fix/logout-hint-subject branch December 1, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant