Skip to content

[Security] Unbounded WebSocket message size allows memory exhaustion DoS #46

@coderabbitai

Description

@coderabbitai

Summary

No maximum payload size configured on WebSocket servers, allowing memory exhaustion attacks.

Affected Code

  • server-services/start-services.js Line 173
  • server-game/start-game.js Line 47

Vulnerability

The ws library by default has no hard cap. Single huge messages can OOM the process.

Impact

  • Crash services or game servers
  • Exhaust memory with single connection

Recommended Fix

Set maxPayload: 1048576 (1 MB) on WebSocketServer instantiation.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions