Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2025-54994 @akoskm/create-mcp-server…

Fix: akoskm/create-mcp-server-stdio@48c26bb

CVE-2025-54994 is a OS Command Injection vulnerability in @akoskm/create-mcp-server-stdio. A fix is available for @akoskm/create-mcp-server-stdio — see the affected versions and patch details below.

@akoskm/create-mcp-server-stdio has Command Injection in MCP Server due to unsafe `exec` API

Also known asGHSA-3ch2-jxxc-v4xf
Published
Sep 8, 2025
Updated
Aug 12, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-54994.

EPSS Exploitation Probability

via FIRST.org ↗
1.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs70th percentile — riskier than 70% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

0other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@akoskm/create-mcp-server-stdionpm
51downloads / week

Description

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:

Cursor defined MCP Server vulnerable to command injection

Impact

User initiated and remote command injection on a running MCP Server.

Recommendation

  • Don't use exec. Use execFile instead, 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

  1. Exploiting MCP Servers Vulnerable to Command Injection
  2. Liran's Node.js Secure Coding: Defending Against Command Injection Vulnerabilities

Disclosed by Liran Tal

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@akoskm/create-mcp-server-stdioall versions0.0.13npm install @akoskm/create-mcp-server-stdio@0.0.13

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @akoskm/create-mcp-server-stdio, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. 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 CVE-2025-54994 is resolved across your whole dependency graph.

  3. 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.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-54994 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2025-54994. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

# 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 ```js server.tool("which-app-on-po
O3 Security · Impact-Aware SCA

Is CVE-2025-54994 in your dependencies?

O3 Security finds CVE-2025-54994 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2025-54994: @akoskm/create-mcp | O3 Security