CommandKit CVE-2025-62378
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain low-privileged Discord server access
-
ExploitInvoke restricted command via its alias
-
Executionctx.commandName returns alias, bypassing permission check
-
ImpactUnauthorized command executes / audit record falsified
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrectly specified target
|
| Exploitation Conditions | Exploitation requires all of the following: the target bot uses CommandKit message commands (slash commands and context menu commands are explicitly unaffected); the bot defines one or more command aliases; and the developer relies on ctx.commandName within middleware or the command's run function for security-sensitive logic such as permission checks, rate limiting, or audit logging - on a vulnerable build between 1.2.0-rc.1 and 1.2.0-rc.11. Limiting factors that reduce real-world risk: it is non-default/usage-dependent (bots that validate against ctx.command.data.command.name, enumerate all aliases, or avoid aliases are not exploitable), the attacker must be able to send message commands to the bot, and only pre-release RC versions are affected. |
| Impact | Signals point to a conditional, medium-severity issue rather than an urgent priority. The input CVSS base score is 6.1 (medium), driven by I:H (integrity) from potential authorization bypass. EPSS is very low at 0.16% (5th percentile), there is no CISA KEV listing, and no public exploit code is referenced - all consistent with a flaw that is not being broadly exploited. SSVC data was not provided in the input. A key signal conflict must be flagged: the supplied CVSS vector uses AV:L (local attack vector), yet the vulnerability is triggered by a Discord user sending a message command over the network to a bot, which is logically network-reachable - this looks like a mis-scored attack vector and should be verified; if AV is actually network, exploitability is higher than the local vector implies. Critically, exploitation is entirely contingent on a developer anti-pattern (relying on ctx.commandName for security logic while also defining command aliases), so the real-world attack surface is limited to specific, misconfigured bots rather than any default deployment. Net assessment: a legitimate authorization-logic bug worth patching for affected deployments, but low urgency at the ecosystem level given low EPSS, no known exploitation, pre-release (RC) affected versions, and the conditional trigger. |
| Exploit ScenarioDerived | A low-privileged member of a Discord server targets a bot built on a vulnerable CommandKit RC that defines message-command aliases and enforces permission checks, rate limits, or audit logging in middleware based on ctx.commandName. The attacker invokes a restricted command using its alias; because ctx.commandName returns the alias instead of the canonical name, the middleware's permission check fails to match and the restricted command executes. No public exploit code was identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Discord bots built on CommandKit 1.2.0-rc.1 through 1.2.0-rc.11 can misattribute the invoked command when a user triggers a message command through an alias, because ctx.commandName returns the alias string rather than the canonical command name in both middleware functions and the command's own run function. Deployments that key security-sensitive logic - permission checks, rate limiting, or audit logging - off ctx.commandName may consequently make incorrect access-control decisions and allow unauthorized command execution; slash commands and context-menu commands are explicitly unaffected. The bug is conditional and usage-dependent (a bot must define aliases and rely on ctx.commandName for enforcement), only pre-release RC builds are vulnerable, and no public exploit has been identified at time of analysis; EPSS is low at 0.16% (5th percentile) and the issue is not in CISA KEV. A vendor patch is available in 1.2.0-rc.12.
RemediationAI
Upgrade to the vendor-released patch, CommandKit 1.2.0-rc.12, which normalizes ctx.commandName to the canonical command name regardless of the alias used to invoke it; the corresponding upstream fix commit is 440385a3e5de3fa3d2a76d23a807995cb29602fd (https://github.com/underctrl-io/commandkit/commit/440385a3e5de3fa3d2a76d23a807995cb29602fd) and the advisory is https://github.com/underctrl-io/commandkit/security/advisories/GHSA-fhwm-pc6r-4h2f. If immediate upgrade is not possible, apply the vendor-documented workarounds inside your own bot code rather than the framework: replace any authorization, rate-limiting, or audit decision that reads ctx.commandName with ctx.command.data.command.name, which always carries the canonical name - noting the trade-off that this property path is lower-level and any code still comparing against ctx.commandName (logs, dashboards, string-keyed config) will diverge and must be migrated together; alternatively, explicitly enumerate every alias of each command in your permission logic, which is safe but brittle because newly added aliases silently fall outside the check until the list is updated. Review existing middleware and command run functions for permission checks, rate limiters, and audit logging keyed off ctx.commandName to determine exploitability, since bots that already validate on ctx.command.data.command.name, enumerate all aliases, or define no aliases are not affected. A separate compensating control is to keep the bot from acting on message-command input from untrusted users (restrict which roles/channels can invoke prefix commands) until the upgrade is deployed, accepting the loss of functionality for those users.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CommandKit is a meta-framework layered on top of discord.js for building Discord bots, distributing middleware and command handlers that receive a shared context object (ctx). The flaw sits in the framework's message command handler and its alias resolution path: when an incoming Discord message matches a registered alias, the handler propagates the alias literal into ctx.commandName instead of resolving it back to the canonical command identifier, and it does so consistently in both the middleware chain and the run function. The root cause class is CWE-706 (Use of Incorrectly-Resolved Name or Reference) - a name that the framework's own documentation and examples treat as canonical ('Middleware examples consistently use ctx.commandName to reference the command being executed', described as suitable for 'logging, authentication, permission checks') actually carries an unnormalized user-supplied alias. Because authorization logic in downstream bots is expressed against that string, the mismatch between expected and actual value creates an authorization-logic gap rather than a memory-safety or injection defect. Affected package identity from the advisory is npm/commandkit, vulnerable range >= 1.2.0-rc.1 and <= 1.2.0-rc.11, fixed in 1.2.0-rc.12; only the pre-release RC line is impacted, and slash-command and context-menu dispatch paths are not.
Know when Canonical gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
Triggered remotely via Discord messages (AV:N, not the input's AV:L); AC:H because it depends on the bot's alias-plus-ctx.commandName configuration beyond attacker control; PR:L as the attacker is a low-privileged member; I:H for authorization bypass, C:L for inaccurate audit data.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which
Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using
The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.
When running Apache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46 and 7.0.0 to 7.0.81 with HTT
Remote code execution is possible with Apache Tomcat before 6.0.48, 7.x before 7.0.73, 8.x before 8.0.39, 8.5.x before 8
GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of
The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packe
Race condition in mm/gup.c in the Linux kernel 2.x through 4.x before 4.8.3 allows local users to gain privileges by lev
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 17 and earlier, and
Local privilege escalation in the GNU C Library (glibc) dynamic loader ld.so allows unprivileged local users on affected
NVD
CVE.org
EPSS
GitHub
Exploit-DB