Executive brief
Agentic-Flow is a platform used to coordinate and manage AI agents. A security flaw in its Model Context Protocol (MCP) server tools allows an attacker to execute unauthorized commands on the underlying server. This could lead to a complete system takeover, theft of sensitive data, or disruption of AI operations, especially if the platform processes untrusted content from the web.
Technical details
The vulnerability is a CWE-78 (OS Command Injection) resulting from the use of `execSync()` with template literals containing attacker-controlled parameters (e.g., agent, task, name, language). Affected components include various MCP server implementations such as `standalone-stdio.ts`, `claude-flow-sdk.ts`, and several tools in the `fastmcp` subtree. An attacker can break out of the intended command string using shell metacharacters (like `;`, `&`, or backticks) to execute arbitrary OS commands. The issue is particularly severe in HTTP/SSE transport deployments that lack authentication or origin validation. The fix, introduced in version 2.0.14, replaces `execSync` with `execFileSync` using `shell: false` to ensure arguments are passed as a literal array to the OS without shell interpretation.
Affected products
- ruvnet agentic-flow < 2.0.14
Timeline
- 2026-06-18: patched: Fix commit merged into main branch
- 2026-07-17: disclosed: CVE-2026-58195 published
References
- https://github.com/ruvnet/agentic-flow/commit/0c2ec967736a8b6b85832c6bae2a3e74989705ec
- https://github.com/ruvnet/agentic-flow/issues/169
- https://github.com/ruvnet/agentic-flow/pull/170
- https://github.com/ruvnet/agentic-flow/security/advisories/GHSA-vcv2-r9jh-99m5
- https://github.com/ruvnet/ruflo/issues/2414
- https://github.com/ruvnet/ruflo/pull/2415
- https://github.com/ruvnet/ruflo/releases/tag/v3.12.4