CVE-2025-62378
CommandKit exposes incorrect command name in context object for message command aliases
Description
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.
INFO
Published Date :
Oct. 15, 2025, 5:16 p.m.
Last Modified :
Oct. 8, 2026, 11:10 a.m.
Remotely Exploit :
No
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update CommandKit to a patched version.
- Verify ctx.commandName reflects the canonical command.
- Adjust middleware logic if needed.
- Retest authorization and access control.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-62378.
| URL | Resource |
|---|---|
| https://github.com/underctrl-io/commandkit/security/advisories/GHSA-fhwm-pc6r-4h2f |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-62378 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-62378
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-62378 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-62378 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 08, 2026
Action Type Old Value New Value Added Translation Title: commandkit de underctrl-io, Description: 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. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'underctrl-io', 'product': 'commandkit', 'versions': [{'status': 'affected', 'version': '>= 1.2.0-rc.1 < 1.2.0-rc.12'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2025-62378', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2025-10-15T17:13:11.098735Z'} -
New CVE Received by [email protected]
Oct. 15, 2025
Action Type Old Value New Value Added Description 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. Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N Added CWE CWE-706 Added Reference https://github.com/underctrl-io/commandkit/security/advisories/GHSA-fhwm-pc6r-4h2f