GHSA-3ch2-jxxc-v4xf
Fix: akoskm/create-mcp-server-stdio#1GHSA-3ch2-jxxc-v4xf is a OS Command Injection vulnerability in @akoskm/create-mcp-server-stdio. O3 Security confirms whether GHSA-3ch2-jxxc-v4xf is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
@akoskm/create-mcp-server-stdio is vulnerable to MCP Server Command Injection through `exec` API
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.
@akoskm/create-mcp-server-stdionpmDescription
Command Injection in MCP Server
The 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.
Vulnerable tool
The 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.
Vulnerable line of code: https://github.com/akoskm/create-mcp-server-stdio/blob/main/src/index.ts#L24-L40
server.tool("which-app-on-port", { port: z.number() }, async ({ port }) => {
const result = await new Promise<ProcessInfo>((resolve, reject) => {
exec(`lsof -t -i tcp:${port}`, (error, pidStdout) => {
if (error) {
reject(error);
return;
}
const pid = pidStdout.trim();
exec(`ps -p ${pid} -o comm=`, (error, stdout) => {
if (error) {
reject(error);
return;
}
resolve({ command: stdout.trim(), pid });
});
});
});
Exploitation
When 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.
Reference example from prior security research on this topic:

Impact
User initiated and remote command injection on a running MCP Server.
Recommendation
- Don't use
exec. UseexecFileinstead, which pins the command and provides the arguments as array elements. - 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.
References and Prior work
- Exploiting MCP Servers Vulnerable to Command Injection
- Liran's Node.js Secure Coding: Defending Against Command Injection Vulnerabilities
Disclosed by Liran Tal
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @akoskm/create-mcp-server-stdio | all versions | 0.0.13 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @akoskm/create-mcp-server-stdio. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update @akoskm/create-mcp-server-stdio to 0.0.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-3ch2-jxxc-v4xf is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-3ch2-jxxc-v4xf is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-3ch2-jxxc-v4xf. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-3ch2-jxxc-v4xf in your dependencies?
O3 detects GHSA-3ch2-jxxc-v4xf across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.