CWE-706Weakness · CWE-706

CVE-2025-62378

MEDIUM · 6.1 CVSS v3.1 Published 2025-10-15
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
63/100
Remediation priority · Elevated
Zero-click

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 · unedited
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.

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 confidence

CommandKit 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.

MitigationUpgrade 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.

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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed CommandKit version
    Run 'npm list commandkit' or 'pnpm list commandkit' in your project directory to see the currently installed version of CommandKit
    Affected if The version listed is between 1.2.0-rc.1 and 1.2.0-rc.11 inclusive
  2. Review command configuration for aliases
    Inspect your command definitions (typically in your commands folder or command registration code) to identify any commands that have aliases defined
    Affected if Any command has one or more aliases configured that could be used to invoke it instead of the primary command name
  3. Locate ctx.commandName usage in security contexts
    Search your codebase for occurrences of 'ctx.commandName' within middleware files, permission handlers, rate limiters, or audit logging code
    Affected if Your code uses ctx.commandName for access control decisions, rate limiting keys, or logging that distinguishes between commands
  4. Verify behavior with alias invocation
    If 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 returned
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade 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.

Recommended fix High confidence

1.2.0-rc.12

  1. Check the current CommandKit version in package.json or package-lock.json
  2. Update the CommandKit dependency to version 1.2.0-rc.12 or later using npm install [email protected] (or yarn/pnpm equivalent)
  3. Run npm install, yarn install, or pnpm install to fetch the updated package
  4. Test message commands that use aliases to verify ctx.commandName now returns the canonical command name
  5. Verify middleware and command execution contexts correctly reference the canonical command identifier
  6. Review any code that relied on ctx.commandName returning the alias and update if necessary
Caveat Code that explicitly depended on ctx.commandName returning the alias (contrary to documented intent) may need updates

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing2.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,060
Get help mitigating

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-62378 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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