Skip to main content

CommandKit CVE-2025-62378

MEDIUM
Use of Incorrectly-Resolved Name or Reference (CWE-706)
2025-10-15 security-advisories@github.com
6.1
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain low-privileged Discord server access
  2. Exploit
    Invoke restricted command via its alias
  3. Execution
    ctx.commandName returns alias, bypassing permission check
  4. Impact
    Unauthorized 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

npm commandkit fix: 1.2.0-rc.12

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

Vendor (github) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
None

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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Low
niche discord.js bot framework; affected builds are pre-release release candidates
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2019-11043 CRITICAL POC
9.8 Oct 28

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

CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2016-3714 HIGH POC
8.4 May 05

The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.

CVE-2017-12617 HIGH POC
8.1 Oct 04

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

CVE-2016-8735 CRITICAL POC
9.8 Apr 06

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

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2014-0160 HIGH POC
7.5 Apr 07

The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packe

CVE-2016-5195 HIGH POC
7.0 Nov 10

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

CVE-2013-2423 LOW POC
3.7 Apr 17

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 17 and earlier, and

CVE-2023-4911 HIGH POC
7.8 Oct 03

Local privilege escalation in the GNU C Library (glibc) dynamic loader ld.so allows unprivileged local users on affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy