{"vuln_id":"GHSA-9mqq-jqxf-grvw","aliases":["CVE-2026-44336"],"description":"PraisonAI MCP `tools/call` path-traversal => RCE via Python `.pth` injection","published_at":"2026-05-11T13:58:47Z","modified_at":"2026-11-16T15:59:37Z","first_seen_at":"2026-11-21T19:15:20.271127Z","severity":"critical","severity_source":"ghsa","cvss_score":9.4,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","cwe":["CWE-20","CWE-22","CWE-94","CWE-829","CWE-913"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-9mqq-jqxf-grvw"},"matched_alias":null,"items":[{"id":2522,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-9mqq-jqxf-grvw / CVE-2026-44336: PraisonAI MCP `tools/call` path-traversal => RCE via Python `.pth` injection","summary":"PraisonAI MCP `tools/call` path-traversal => RCE via Python `.pth` injection\n\n## Summary\n\nPraisonAI's MCP (Model Context Protocol) server (`praisonai mcp serve`) registers four file-handling tools by default — `praisonai.rules.create`, `praisonai.rules.show`, `praisonai.rules.delete`, and `praisonai.workflow.show`. Each accepts a path or filename string from MCP `tools/call` arguments and joins it onto `~/.praison/rules/` (or, for `workflow.show`, accepts an absolute path) **with no containment check**. The JSON-RPC dispatcher passes `params[\"arguments\"]` blind to each handler via `**kwargs` without validating against the advertised input schema.\n\nBy setting `rule_name=\"../../\n\"` an attacker walks out of the rules directory and writes any file the running user can write. Dropping a Python `.pth` file into the user site-packages directory escalates this primitive to **arbitrary code execution in any subsequent Python process the user spawns** — the next `praisonai` CLI invocation, an IDE script run, the user's `python` REPL, or any background Python service. The same primitive is reachable from:\n\n- An MCP-connected LLM (Claude Desktop, Cursor, Continue.dev, Claude Code) whose context is poisoned by attacker-controlled web content / documents / emails — **no operator click required beyond ordinary \"ask the LLM to summarise this page\" usage**.\n- `praisonai mcp serve --transport http-stream` with no `--api-key` (default), reachable from any local process / DNS-rebound browser tab / container neighbour sharing loopback.\n- Stdio MCP from any prompt-injection vector that reaches the connected LLM.\n\nNo operator misconfiguration is required. No env var, flag, or config switch disables the vulnerable handlers.\n\n---\n\n## Details\n\n### 1. The dispatcher accepts unvalidated kwargs\n\n`src/praisonai/praisonai/mcp_server/server.py:281-298`:\n\n```python\nasync def _handle_tools_call(self, params: Dict[str, Any]) -> Dict[str, Any]:\n\"\"\"Handle tools/call request.\"\"\"\ntool_name = params.get(\"name\")\narguments = params.get(\"arguments\", {})\n\nif not tool_name:\nraise ValueError(\"Tool name required\")\n\ntool = self._tool_registry.get(tool_name)\nif tool is None:\nraise ValueError(f\"Tool not found: {tool_name}\")\n\n# Execute tool\ntry:\nif asyncio.iscoroutinefunction(tool.handler):\nresult = await tool.handler(**arguments) # ← no schema enforcement\nelse:\nresult = tool.handler(**arguments)\n```\n\n`tool.input_schema` is built reflectively from the handler signature in `registry.py:320-376` and surfaced in `tools/list` responses — but it is **never enforced** before dispatch. Whatever JSON shape the MCP client (or an LLM under prompt injection) sends becomes a `**kwargs` call.\n\n### 2. The four registered handlers have no containment\n\n`src/praisonai/praisonai/mcp_server/adapters/cli_tools.py`:\n\n```python\n# line 116-128 — rules.create — primary write primitive\n@register_tool(\"praisonai.rules.create\")\ndef rules_create(rule_name: str, content: str) -> str:\n\"\"\"Create\n\nAffected packages: pip:PraisonAI\nPatched: PraisonAI 4.6.34","url":"https://github.com/advisories/GHSA-9mqq-jqxf-grvw","published_at":"2026-05-11T13:58:47Z","updated_at":"2026-11-16T15:59:37Z","fetched_at":"2026-11-21T19:15:18.416904Z","severity":"critical","cvss_score":9.4,"epss":0.0062,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"PraisonAI","vuln_id":"CVE-2026-44336","vuln_ids":["CVE-2026-44336","GHSA-9MQQ-JQXF-GRVW"],"tags":["ghsa","pip","CWE-20","CWE-22","CWE-94","CWE-829","CWE-913"],"cluster_id":2489,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2522","html":"https://vulnwatch.ve1ve2.com/item/2522"}}]}