CVE-2025-62378

CommandKit is the discord.js meta-framework for building Discord bots. In versions 1.2.0-rc.1 through 1.2.0-rc.11, a logic flaw exists in the message command handler 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. Although not explicitly documented, CommandKit's examples and guidance around middleware usage implicitly convey that ctx.commandName represents the canonical command identifier. Middleware examples in the documentation consistently use ctx.commandName to reference the command being executed. Developers who assume ctx.commandName is canonical may introduce unintended behavior when relying on it for logic such as permission checks, rate limiting, or audit logging. This could allow unauthorized command execution or inaccurate access control decisions. Slash commands and context menu commands are not affected. This issue has been patched in version 1.2.0-rc.12, where ctx.commandName now consistently returns the actual canonical command name regardless of the alias used to invoke it.
Configurations

No configuration.

History

08 Oct 2026, 11:10

Type Values Removed Values Added
Summary
  • (es) CommandKit es el meta-framework de discord.js para construir bots de Discord. En las versiones 1.2.0-rc.1 a 1.2.0-rc.11, existe una falla lógica en el gestor de comandos de mensajes que afecta cómo la propiedad commandName se expone tanto a las funciones middleware como a los contextos de ejecución de comandos al manejar alias de comandos. Cuando un comando de mensaje es invocado usando un alias, el valor ctx.commandName refleja el alias en lugar del nombre canónico del comando. Esto ocurre tanto en las funciones middleware como dentro de la propia función run del comando. Aunque no está explícitamente documentado, los ejemplos y la guía de CommandKit sobre el uso de middleware transmiten implícitamente que ctx.commandName representa el identificador canónico del comando. Los ejemplos de middleware en la documentación usan consistentemente ctx.commandName para referenciar el comando que se está ejecutando. Los desarrolladores que asumen que ctx.commandName es canónico pueden introducir un comportamiento no deseado al depender de él para lógica como verificaciones de permisos, limitación de velocidad o registro de auditoría. Esto podría permitir la ejecución no autorizada de comandos o decisiones imprecisas de control de acceso. Los comandos de barra y los comandos de menú contextual no se ven afectados. Este problema ha sido parcheado en la versión 1.2.0-rc.12, donde ctx.commandName ahora devuelve consistentemente el nombre canónico real del comando, independientemente del alias utilizado para invocarlo.

Information

Published : 2025-10-15 17:16

Updated : 2026-10-08 11:10


NVD link : CVE-2025-62378

Mitre link : CVE-2025-62378

CVE.ORG link : CVE-2025-62378


JSON object : View

Products Affected

No product.

CWE
CWE-706

Use of Incorrectly-Resolved Name or Reference