Miggo Logo

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

6.1

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
10/13/2025
Updated
10/15/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
commandkitnpm>= 1.2.0-rc.1, <= 1.2.0-rc.111.2.0-rc.12

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists in the commandkit library, where the Context.commandName getter for message commands incorrectly returned the command alias instead of the canonical command name. This could cause security issues in applications that use this value for permission checks or other security-sensitive logic.

The analysis of the provided patch 440385a3e5de3fa3d2a76d23a807995cb29602fd reveals the exact location of the vulnerability and the fix.

  1. Vulnerable Function Identification: The file packages/commandkit/src/app/commands/Context.ts contains the Context class with the commandName getter. The diff shows that the logic for handling message commands was changed. The old code returned the direct output of getCommand(), which was the alias. The new code calls a new function resolveMessageCommandName to get the canonical name.

  2. Fix Analysis: A new function, resolveMessageCommandName, was added to the AppCommandHandler class in packages/commandkit/src/app/handlers/AppCommandHandler.ts. This function iterates through the loaded commands and their aliases to find the correct canonical command name for a given input, which could be an alias.

Therefore, the root cause of the vulnerability is the incorrect value being returned by Context.commandName. An attacker could exploit this by using a command's alias to bypass checks that are based on the canonical command name.

Vulnerable functions

Context.commandName
packages/commandkit/src/app/commands/Context.ts
The `commandName` getter in the `Context` class was returning the command alias instead of the canonical command name when a message command was invoked with an alias. This is because it directly returned the output of `this.config.messageCommandParser!.getCommand()`, which could be an alias. This could lead to bypass of security controls like permission checks if they relied on the command name for validation.

WAF Protection Rules

WAF Rule

### Imp**t * lo*i* *l*w *xists in t** m*ss*** *omm*n* **n*l*r o* *omm*n*Kit t**t *****ts *ow t** `*omm*n*N*m*` prop*rty is *xpos** to *ot* mi**l*w*r* *un*tions *n* *omm*n* *x**ution *ont*xts w**n **n*lin* *omm*n* *li*s*s. W**n * m*ss*** *omm*n* is i

Reasoning

T** vuln*r**ility *xists in t** `*omm*n*kit` li*r*ry, w**r* t** `*ont*xt.*omm*n*N*m*` **tt*r *or m*ss*** *omm*n*s in*orr**tly r*turn** t** *omm*n* *li*s inst*** o* t** **noni**l *omm*n* n*m*. T*is *oul* **us* s**urity issu*s in *ppli**tions t**t us*