Vulnerabilities in pkg:npm/commandkit
PACKAGECVE-2025-62378 is a MODERATE (CVSS 6.1) commandkit has incorrect command name vulnerability (CWE-706: Use of Incorrectly-Resolved Name or Reference) affecting Commandkit libraries in the npm ecosystem. The issue involves commandkit has incorrect command name exposure in context object for message command aliases. Remediation is available by upgrading affected packages to version 1.2.0-rc.12.
pkg:npm/commandkit
Vulnerability advisories affecting package pkg:npm/commandkit. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-fhwm-pc6r-4h2f | CVE-2025-62378 | MODERATE | CommandKit has incorrect command name exposure in context object for message command aliases |
CVE-2025-62378 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N).
How to Fix CVE-2025-62378
To remediate this vulnerability, upgrade all affected Commandkit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install commandkit@1.2.0-rc.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls commandkit
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-62378, inspect your project dependencies using npm:
npm ls commandkit
Analyze the terminal output to locate any version of Commandkit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0-rc.12), your application is affected.
Note: The npm ls commandkit command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-706: Use of Incorrectly-Resolved Name or Reference, where the product uses a name or reference to access a resource, but the name/reference resolves to a resource that is outside of the intended control sphere. In Commandkit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-62378 Affected Commandkit Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
commandkit
|
npm |
≥ 1.2.0-rc.1
< 1.2.0-rc.12
|
1.2.0-rc.12
|
References
Frequently Asked Questions
What is CVE-2025-62378?
Which Commandkit versions are affected?
What version fixes CVE-2025-62378?
Is commandkit affected?
What is the CVSS score of CVE-2025-62378?
What CWE is associated with CVE-2025-62378?
How can I check npm dependencies for CVE-2025-62378?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fhwm-pc6r-4h2f",
"modified" : "2025-10-15T19:14:41Z",
"published" : "2025-10-13T17:43:51Z",
"aliases" : [ "CVE-2025-62378" ],
"summary" : "CommandKit has incorrect command name exposure in context object for message command aliases",
"details" : "### Impact\n\nA 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.\n\nAlthough 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.\n\nDevelopers 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.\n\n### Patches\n\nFixed in v1.2.0-rc.12.\n`ctx.commandName` now consistently returns the actual canonical command name, regardless of the alias used to invoke it.\n\n### Workaround\n\nIf upgrading isn't immediately possible:\n\n* Use `ctx.command.data.command.name` for permission validations, or\n* Include all command aliases in your permission logic.\n\n### References\n\n* [CommandKit repository](https://github.com/underctrl-io/commandkit)\n* [Middleware documentation](https://commandkit.dev/docs/guide/commands/middlewares)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "commandkit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.2.0-rc.1"
}, {
"fixed" : "1.2.0-rc.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.0-rc.11"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/underctrl-io/commandkit/security/advisories/GHSA-fhwm-pc6r-4h2f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62378"
}, {
"type" : "WEB",
"url" : "https://github.com/underctrl-io/commandkit/commit/440385a3e5de3fa3d2a76d23a807995cb29602fd"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/underctrl-io/commandkit"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-706" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-10-13T17:43:51Z",
"nvd_published_at" : "2025-10-15T17:16:00Z"
}
}