Skip to content

[HIGH] No Rate Limiting on Public Commands - DoS Vulnerability #47

Description

@galpt

🟠 High: No Rate Limiting on Public Commands - DoS Vulnerability

Problem Description

There is no rate limiting on any public-facing commands. An attacker can:

  • Spam =games rps or =games tictactoe commands to exhaust database connections
  • Create unlimited reminders via =reminder create
  • Flood channels with mirror links via autolink
  • Trigger expensive database writes repeatedly

The games.py RPSPlayView and TicTacToeView each create new database connections without pooling or limits.

Affected Commands

  • /games rps and /games tictactoe - database writes per game
  • /reminder create - unlimited reminder creation
  • autolink on_message handler - unlimited URL mirroring

Impact

  • Denial of Service from resource exhaustion
  • Database connection pool starvation
  • Discord API rate limit violations

Recommended Fix

Implement rate limiting using Py-cord's built-in cooldown system:

@commands.cooldown(rate=5, per=60.0, type=commands.BucketType.user)
async def rps(self, ctx: discord.ApplicationContext, opponent: discord.User = None):
    # ...

Severity

HIGH — DoS vulnerability on public commands.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions