CVE-2025-62378
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedCommandKit 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceCommandKit versions 1.2.0-rc.1 through 1.2.0-rc.11 contain a logic flaw where the message command handler's ctx.commandName property incorrectly returns the alias used to invoke a command instead of the canonical command name. This affects both middleware functions and command execution contexts. Developers using ctx.commandName for permission checks, rate limiting, or audit logging may make incorrect access control decisions based on the alias rather than the actual command.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Local
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed CommandKit versionRun 'npm list commandkit' or 'pnpm list commandkit' in your project directory to see the currently installed version of CommandKitAffected if The version listed is between 1.2.0-rc.1 and 1.2.0-rc.11 inclusive
-
Review command configuration for aliasesInspect your command definitions (typically in your commands folder or command registration code) to identify any commands that have aliases definedAffected if Any command has one or more aliases configured that could be used to invoke it instead of the primary command name
-
Locate ctx.commandName usage in security contextsSearch your codebase for occurrences of 'ctx.commandName' within middleware files, permission handlers, rate limiters, or audit logging codeAffected if Your code uses ctx.commandName for access control decisions, rate limiting keys, or logging that distinguishes between commands
-
Verify behavior with alias invocationIf your bot is running, invoke a command using one of its aliases and log or inspect the value of ctx.commandName inside a middleware or the command handler to see what name is returnedAffected if When invoked via alias, ctx.commandName returns the alias name rather than the canonical command name defined in the command registration
You are affected if your CommandKit version is 1.2.0-rc.1 through 1.2.0-rc.11 AND your bot uses command aliases AND your code relies on ctx.commandName for security-critical decisions.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade CommandKit to version 1.2.0-rc.12 or later to ensure ctx.commandName consistently returns the canonical command name. Review existing middleware and command code that relies on ctx.commandName for security decisions to verify correct behavior after upgrading.
1.2.0-rc.12
- Check the current CommandKit version in package.json or package-lock.json
- Update the CommandKit dependency to version 1.2.0-rc.12 or later using npm install [email protected] (or yarn/pnpm equivalent)
- Run npm install, yarn install, or pnpm install to fetch the updated package
- Test message commands that use aliases to verify ctx.commandName now returns the canonical command name
- Verify middleware and command execution contexts correctly reference the canonical command identifier
- Review any code that relied on ctx.commandName returning the alias and update if necessary
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,696.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-62378 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-62378 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data