Vulnerabilities in pkg:npm/@akoskm/create-mcp-server-stdio
PACKAGECVE-2025-54994 is a CRITICAL @akoskm/create-mcp-server-stdio is vulnerable to mcp vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting @akoskm/create mcp server stdio libraries in the npm ecosystem. The issue involves @akoskm/create-mcp-server-stdio is vulnerable to mcp server command injection through `exec` api. Remediation is available by upgrading affected packages to version 0.0.13.
pkg:npm/@akoskm/create-mcp-server-stdio
Vulnerability advisories affecting package pkg:npm/@akoskm/create-mcp-server-stdio. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3ch2-jxxc-v4xf | CVE-2025-54994 | CRITICAL | @akoskm/create-mcp-server-stdio is vulnerable to MCP Server Command Injection through `exec` API |
CVE-2025-54994 at a Glance
How to Fix CVE-2025-54994
To remediate this vulnerability, upgrade all affected @akoskm/create mcp server stdio 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 @akoskm/create-mcp-server-stdio@0.0.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @akoskm/create-mcp-server-stdio
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-54994, inspect your project dependencies using npm:
npm ls @akoskm/create-mcp-server-stdio
Analyze the terminal output to locate any version of @akoskm/create mcp server stdio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.13), your application is affected.
Note: The npm ls @akoskm/create-mcp-server-stdio 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In @akoskm/create mcp server stdio, 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-54994 Affected @akoskm/create mcp server stdio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@akoskm/create-mcp-server-stdio
|
npm |
< 0.0.13
|
0.0.13
|
References
Frequently Asked Questions
What is CVE-2025-54994?
Which @akoskm/create mcp server stdio versions are affected?
What version fixes CVE-2025-54994?
Is @akoskm/create-mcp-server-stdio affected?
What CWE is associated with CVE-2025-54994?
How can I check npm dependencies for CVE-2025-54994?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3ch2-jxxc-v4xf",
"modified" : "2025-09-10T21:03:16Z",
"published" : "2025-09-08T19:42:34Z",
"aliases" : [ "CVE-2025-54994" ],
"summary" : "@akoskm/create-mcp-server-stdio is vulnerable to MCP Server Command Injection through `exec` API",
"details" : "# Command Injection in MCP Server\n\nThe MCP Server at https://github.com/akoskm/create-mcp-server-stdio is written in a way that is vulnerable to command injection vulnerability attacks as part of some of its MCP Server tool definition and implementation.\n\n## Vulnerable tool\n\nThe MCP Server exposes the tool `which-app-on-port` which relies on Node.js child process API `exec` which is an unsafe and vulnerable API if concatenated with untrusted user input.\n\nVulnerable line of code: https://github.com/akoskm/create-mcp-server-stdio/blob/main/src/index.ts#L24-L40\n\n```js\nserver.tool(\"which-app-on-port\", { port: z.number() }, async ({ port }) => {\n const result = await new Promise<ProcessInfo>((resolve, reject) => {\n exec(`lsof -t -i tcp:${port}`, (error, pidStdout) => {\n if (error) {\n reject(error);\n return;\n }\n const pid = pidStdout.trim();\n exec(`ps -p ${pid} -o comm=`, (error, stdout) => {\n if (error) {\n reject(error);\n return;\n }\n resolve({ command: stdout.trim(), pid });\n });\n });\n });\n```\n\n## Exploitation\n\nWhen LLMs are tricked through prompt injection (and other techniques and attack vectors) to call the tool with input that uses special shell characters such as `; rm -rf /tmp;#` (be careful actually executing this payload) and other payload variations, the full command-line text will be interepted by the shell and result in other commands except of `ps` executing on the host running the MCP Server.\n\nReference example from prior security research on this topic:\n\n\n\n## Impact\n\nUser initiated and remote command injection on a running MCP Server.\n\n## Recommendation\n\n- Don't use `exec`. Use `execFile` instead, which pins the command and provides the arguments as array elements.\n- If the user input is not a command-line flag, use the `--` notation to terminate command and command-line flag, and indicate that the text after the `--` double dash notation is benign value.\n\n## References and Prior work\n\n1. [Exploiting MCP Servers Vulnerable to Command Injection](https://snyk.io/articles/exploiting-mcp-servers-vulnerable-to-command-injection/)\n2. Liran's [Node.js Secure Coding: Defending Against Command Injection Vulnerabilities](https://www.nodejs-security.com/book/command-injection)\n\n##\n\nDisclosed by [Liran Tal](https://lirantal.com)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@akoskm/create-mcp-server-stdio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.13"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/akoskm/create-mcp-server-stdio/security/advisories/GHSA-3ch2-jxxc-v4xf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54994"
}, {
"type" : "WEB",
"url" : "https://github.com/akoskm/create-mcp-server-stdio/pull/1"
}, {
"type" : "WEB",
"url" : "https://github.com/akoskm/create-mcp-server-stdio/commit/48c26bbe1f8c62764e4592f33c8300d1cadd2eac"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/akoskm/create-mcp-server-stdio"
}, {
"type" : "WEB",
"url" : "https://github.com/akoskm/create-mcp-server-stdio/blob/main/src/index.ts#L24-L40"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77", "CWE-78" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-08T19:42:34Z",
"nvd_published_at" : "2025-09-08T20:15:35Z"
}
}