Vulnerability Database

296,663

Total vulnerabilities in the database

CVE-2025-62378

Impact

A logic flaw exists in the message command handler of CommandKit that affects how the commandName property is exposed to both middleware functions and command execution contexts when handling command aliases. When a message command is invoked using an alias, the ctx.commandName value reflects the alias rather than the canonical command name. This occurs in both middleware functions and within the command’s own run function.

Developers who rely on ctx.commandName for logic that assumes it represents the canonical command identifier may introduce unintended behavior. In security-sensitive cases, such as middleware used for permission checks, rate limiting, or audit logging, this behavior could allow unauthorized command execution or inaccurate access control decisions. Slash commands and context menu commands are not affected.

Patches

Fixed in v1.2.0-rc.12. ctx.commandName now consistently returns the actual command name, regardless of the alias used to invoke it.

Workaround

If upgrading isn't immediately possible:

  • Use ctx.command.data.command.name for permission validations, or
  • Include all command aliases in your permission logic.

References

CVSS v3:

  • Severity: Unknown
  • Score:
  • AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

CWEs: