Skip to content

[Security] connectionStateRecovery skipMiddlewares bypasses auth on reconnect #5491

Description

@eddieran

Summary

When connectionStateRecovery is enabled, skipMiddlewares defaults to true (packages/socket.io/lib/namespace.ts:346-354). Reconnecting clients bypass all auth middleware using the pid. Window: 2 min default.

Impact

Revoked users can reconnect and bypass authorization within the recovery window.

Fix

Default skipMiddlewares to false, or document the security implication.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions