GHSA-hc5v-gxvj-58wh: Input Validation

Published Oct 8, 2026
·
Updated

Summary

PraisonAI's MCP HTTP-stream server authenticates requests only when an API key is configured; the CLI defaults --api-key to None, so praisonai mcp serve --transport http-stream exposes the full MCP surface unauthenticated. A request with no Authorization (and no Origin) can initialize and tools/list (~50 tools), and the dispatcher forwards tool-call arguments to handlers without validating them against the advertised inputSchema. Runtime-confirmed for unauthenticated initialize/tools/list and the dispatcher schema-bypass. This is not an RCE/file-read in 4.6.63 — workflow.run/workflow.runfile are runtime-refuted (adapter regression). Severity Medium–High.

Details

Affected component - Package: praisonai 4.6.63. Files: src/praisonai/praisonai/mcpserver/transports/httpstream.py, mcpserver/cli.py, mcpserver/server.py (dispatcher).

Vulnerable code / root cause

Path: src/praisonai/praisonai/mcpserver/transports/httpstream.py

Function: mcppost / validateorigin

Snippet: python if self.apikey: # auth applied ONLY when apikey is set authheader = request.headers.get("Authorization", "") if not authheader.startswith("Bearer ") or authheader[7:] != self.apikey: return JSONResponse({"error": "Unauthorized"}, statuscode=401) validateorigin: returns True when the Origin header is absent Issue: with apikey=None, no auth check runs; a missing Origin header is allowed, so non-browser clients (curl/Burp) are not blocked.

Path: src/praisonai/praisonai/mcpserver/cli.py

Function: cmdserve (argparse)

Snippet: python parser.addargument("--api-key", default=None) # unauthenticated by default

Path: src/praisonai/praisonai/mcpserver/server.py

Function: handletoolscall

Snippet: python result = await tool.handler(arguments) # arguments forwarded without inputSchema validation Issue: attacker-controlled arguments are passed straight to the handler; the dispatcher does not validate them against the tool's advertised inputSchema. The only thing rejecting undeclared keys is the handler's own Python signature.

Attack flow 1. Operator runs praisonai mcp serve --transport http-stream (no --api-key). 2. Attacker (no auth, no Origin) sends initialize → session; tools/list → enumerates ~50 tools; tools/call → arguments pass through unvalidated.

Why existing protection is bypassed Auth is opt-in (only added when an api key is set); missing Origin is allowed; the dispatcher does not enforce inputSchema.

Security boundary Unauthenticated access to the MCP tool surface. Default bind 127.0.0.1 (any local process / multi-user host; remote only if --host 0.0.0.0).

Scope limits (do not overclaim) - praisonai.workflow.run / workflow.runfile are runtime-refuted in 4.6.63: the adapter calls AgentsGenerator(...) missing the required configlist argument → errors before any execution/file open. Several other tool adapters also error at runtime. No unauthenticated RCE/arbitrary-file-open via these tools at HEAD. - MCP knowledge.add file read is broken (see FT-01KnowledgeFileReadNegativeReport.md).

Proof of Concept

Environment Real MCP HTTP-stream server (apikey=None) in a local runtime (127.0.0.1:18090). Runnable assets: PraisonAI-Runtime-Repro\runtime-files\ (docker-compose.mcp.yml). MCP requests use Accept: application/json + header Mcp-Session-Id.

Steps to reproduce 1. MCP-Initialize: POST /mcp initialize (no Authorization) → 200 + mcp-session-id. 2. MCP-Tools-List-NoAuth: POST /mcp tools/list with that session id → 200 + ~50 tools. 3. MCP-Schema-Bypass: tools/call with an undeclared extra argument (undeclaredevilparam).

Expected result The transport requires authentication; the dispatcher validates arguments against inputSchema.

Actual result - initialize/tools/list succeed with no auth and no Origin header. - The undeclared argument reaches the handler (got an unexpected keyword argument 'undeclaredevilparam'), proving no schema validation at the dispatcher.

Screenshots <img width="1544" height="798" alt="03-MCP-Schema-Bypass" src="https://github.com/user-attachments/assets/5a4cb764-9428-487d-b4e0-2854cbda7fb7" /> <img width="1538" height="793" alt="02-MCP-Tools-List-NoAuth" src="https://github.com/user-attachments/assets/6356af71-867f-4fbc-a994-c7ca338fd2aa" />

Screenshots

Unauthenticated MCP initialize

A POST request to /mcp with method initialize succeeds without an Authorization header. The server returns HTTP 200 OK, exposes MCP capabilities, and issues an mcp-session-id to the unauthenticated client.

<img width="1546" height="804" alt="01-MCP-Initialize-NoAuth" src="https://github.com/user-attachments/assets/2a62ee6b-99d3-4a38-a752-bfe6165c8c04" />

Unauthenticated MCP tools/list

After initialization, the same unauthenticated MCP session can call tools/list using only the issued Mcp-Session-Id. The server returns HTTP 200 OK and exposes tool names, schemas, and annotations.

<img width="1538" height="793" alt="02-MCP-Tools-List-NoAuth" src="https://github.com/user-attachments/assets/f55189ff-13aa-4c36-a617-3d2ee4a52a84" />

MCP tool-call schema bypass

The unauthenticated MCP client calls tools/call with an extra argument not declared in the tool schema. Instead of rejecting the schema-violating input at the dispatcher layer, the unexpected parameter reaches the Python handler and causes an unexpected keyword argument error. This confirms incomplete input-schema enforcement for tool calls.

<img width="1544" height="798" alt="03-MCP-Schema-Bypass" src="https://github.com/user-attachments/assets/d3f36e50-2363-4eb2-8b3c-985ff0e27f6e" />

Impact Unauthenticated tool enumeration and tool-call surface; LLM-key/cost abuse and data access via whichever tools function (impact currently limited by several broken adapters and the default loopback bind). No confirmed unauthenticated RCE/file-read in 4.6.63.

Affected Software

1 affected componentFixes available
pip/praisonai<=4.6.77
4.6.78

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/praisonai to a version that resolves this vulnerability.

    Fixed in 4.6.78
  2. Configuration

    Start the MCP HTTP-stream server with a configured API key (for example, use `praisonai mcp serve --transport http-stream --api-key <key>`); authentication is applied only when `api_key` is set.

    PraisonAI MCP HTTP-stream server --api-key = configured and non-empty
  3. Compensating control

    Validate MCP tool-call arguments against each tool's advertised `inputSchema` in the dispatcher before invoking the handler, rejecting undeclared arguments such as `__undeclared_evil_param__`.

Event History

Oct 8, 2026
Advisory Published
via GitHub·09:58 PM
Data Sourced
via GitHub·09:58 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Is an out-of-the-box HTTP-stream MCP deployment exposed?

Yes. The CLI defaults --api-key to None, so running praisonai mcp serve --transport http-stream exposes the MCP server without authentication unless an API key is explicitly configured.

2

What does an attacker need to access the server?

An attacker only needs network access to the HTTP-stream MCP endpoint. Requests without an Authorization header and without an Origin header were confirmed able to initialize a session and enumerate the available tools.

3

What can an unauthenticated attacker do?

They can access the MCP surface, including tools/list, which exposes roughly 50 tools. Tool-call arguments are forwarded to handlers without validation against the advertised inputSchema.

4

What should be done if patching cannot happen immediately?

Configure an API key for the MCP HTTP-stream server so authentication is applied. Restrict network access to the endpoint as well, since unauthenticated access is possible when no API key is configured.

5

Does the reported issue provide confirmed remote code execution or file-read access in the affected release?

No. In praisonai 4.6.63, workflow.run and workflow.run_file were runtime-refuted because of an adapter regression; the report does not confirm RCE or file-read through those tools.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203