Conversation
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
force-pushed
the
fix/logout-hint-subject
branch
from
November 30, 2026 10:26
81a43ef to
653eb63
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Low-severity logout CSRF, pre-existing.
GET /logoutskipped the confirmation page for any validly signedid_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
submust 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
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.