Skip to content

[Security] connectionStateRecovery skipMiddlewares bypasses auth on reconnect #5491

@eddieran

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.


Found during automated security audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions