CVE-2025-15063

Ollama · Ollama MCP Server execAsync Command Injection Remote Code Execution Multiple Products

A critical remote code execution vulnerability has been identified in Ollama MCP Server, tracked as CVE-2025-15063.

Executive summary

A critical remote code execution vulnerability has been identified in Ollama MCP Server, tracked as CVE-2025-15063. This flaw allows an unauthenticated remote attacker to execute arbitrary commands on the server, potentially leading to a complete system compromise. Due to its critical severity (CVSS 9.8) and lack of required authentication, immediate patching is strongly recommended to prevent unauthorized access and control of affected systems.

Vulnerability

This is a command injection vulnerability that exists within the execAsync method of the Ollama MCP Server. The application fails to properly sanitize or validate a user-supplied string before using it to construct and execute a system command. A remote attacker can send a specially crafted request containing malicious commands (e.g., using shell metacharacters like ;, |, or &&) to the vulnerable execAsync method. Because no authentication is required, the attacker can exploit this flaw to execute arbitrary code with the privileges of the service account running the Ollama MCP Server.

Business impact

This vulnerability is rated as critical severity with a CVSS score of 9.8. Successful exploitation could lead to a complete compromise of the affected server, granting the attacker full control. The potential business impact is severe and includes theft of sensitive data, deployment of ransomware, disruption of services, and the use of the compromised server as a pivot point for further attacks into the internal network. The reputational damage and financial costs associated with a breach of this magnitude are significant.

Remediation

Immediate Action: Immediately apply the security updates provided by the vendor. Organizations should upgrade all instances of Ollama MCP Server to the latest patched version to mitigate this vulnerability. After patching, it is crucial to monitor for any signs of post-exploitation activity and thoroughly review system and application access logs for any indicators of compromise that may have occurred prior to the update.

Proactive Monitoring: Implement enhanced monitoring on affected servers. Security teams should look for suspicious outbound network connections, unexpected processes being spawned by the Ollama service account, and unusual CPU or memory usage. Review web server and application logs for requests to the vulnerable endpoint containing shell metacharacters or common command injection payloads (e.g., wget, curl, bash -c).

Compensating Controls: If patching cannot be immediately deployed, implement the following controls to reduce risk:

  • Restrict network access to the affected service to only trusted IP addresses and subnets using a firewall.
  • Deploy a Web Application Firewall (WAF) or Intrusion Prevention System (IPS) with rules designed to detect and block command injection attack patterns.
  • Ensure the service account running the Ollama MCP Server operates with the principle of least privilege to limit the impact of a potential compromise.

Exploitation status

Public Exploit Available: false

Analyst recommendation

This vulnerability represents a critical and immediate threat to the organization. The combination of a 9.8 CVSS score, remote exploitability, and the lack of an authentication requirement makes it an attractive target for attackers. We strongly recommend that organizations prioritize the immediate patching of all vulnerable Ollama MCP Server installations, starting with those that are internet-facing. Although not currently listed on the CISA KEV catalog, its characteristics make it a prime candidate for future inclusion and widespread exploitation. Assume systems are vulnerable and act decisively to apply the recommended remediation.