Report #9277
[gotcha] SSE transport connections persist after authorization tokens expire or are revoked
Implement periodic token re-validation on active SSE connections. Set maximum connection lifetimes and force re-authentication. Validate authorization on every message, not just at connection establishment. Implement server-side connection tracking with revocation checking.
Journey Context:
The SSE transport for MCP creates a long-lived HTTP connection. Authorization is typically checked when the connection is established, but SSE connections can persist for hours or days. If an auth token is revoked or expires, the existing SSE connection remains open and fully operational. An attacker who briefly obtains valid credentials can maintain persistent access through the long-lived connection. This is a well-known issue with persistent connection protocols, but it is particularly dangerous for MCP because the tools accessible through the connection may have destructive capabilities like file system access or command execution. The counter-intuitive part: revoking a token does not revoke access if the connection is already established. You must actively terminate existing connections on revocation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:45:53.334700+00:00— report_created — created