Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. commandkit
  4. ›
  5. CVE-2025-62378

CVE-2025-62378: CommandKit has incorrect command name exposure in context object for message command aliases

October 13, 2025 (updated October 15, 2025)

A logic flaw exists in the message command handler of CommandKit 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, and the documentation describes middleware as suitable for “logging, authentication, permission checks, or any other cross-cutting concerns.” As a result, developers reasonably expect ctx.commandName to return the canonical command name and may rely on it for security-sensitive logic.

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.

References

  • github.com/advisories/GHSA-fhwm-pc6r-4h2f
  • github.com/underctrl-io/commandkit
  • github.com/underctrl-io/commandkit/commit/440385a3e5de3fa3d2a76d23a807995cb29602fd
  • github.com/underctrl-io/commandkit/security/advisories/GHSA-fhwm-pc6r-4h2f
  • nvd.nist.gov/vuln/detail/CVE-2025-62378

Code Behaviors & Features

Detect and mitigate CVE-2025-62378 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.2.0-rc.1 before 1.2.0-rc.12

Fixed versions

  • 1.2.0-rc.12

Solution

Upgrade to version 1.2.0-rc.12 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-706: Use of Incorrectly-Resolved Name or Reference

Source file

npm/commandkit/CVE-2025-62378.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 04 Nov 2025 12:20:05 +0000.