Vulnerability record · PyPI
PYSEC-0000-praisonai-GHSA-wj6g-v78p-6fx3
Description
PraisonAI's MCP HTTP Stream transport uses an unsafe prefix match when validating the Origin header. The default localhost allowlist includes origins such as http://localhost, and the validation accepts any origin that starts with an allowed value.
As a result, an attacker-controlled origin such as http://localhost.evil.example passes the localhost origin check.
When the MCP HTTP Stream server is started without an API key, which is the CLI default, this allows a malicious webpage to trigger unauthenticated MCP tools/call requests against a locally running PraisonAI MCP server.
This is best framed as a browser-mediated localhost attack / DNS-rebinding-style Origin validation bypass. The default server binds to 127.0.0.1, so this is not a directly internet-facing unauthenticated API in the default configuration.
Relevant source locations:
src/praisonai/praisonai/mcp_server/cli.pysrc/praisonai/praisonai/mcp_server/transports/http_stream.pysrc/praisonai/praisonai/mcp_server/server.pysrc/praisonai/praisonai/mcp_server/adapters/__init__.pysrc/praisonai/praisonai/mcp_server/adapters/extended_capabilities.pysrc/praisonai/praisonai/mcp_server/adapters/cli_tools.pysrc/praisonai/praisonai/capabilities/files.pyThe MCP CLI defaults to HTTP host 127.0.0.1, API key None, and allowed origins None unless explicitly configured:
parser.add_argument("--host", default="127.0.0.1")
parser.add_argument("--port", type=int, default=8080)
parser.add_argument("--api-key", default=None)
parser.add_argument("--allowed-origins", default=None, help="Comma-separated allowed origins for security")
The CLI registers all tools and passes the optional API key and allowed origins into the HTTP Stream transport:
register_all()
server.run_http_stream(
host=parsed.host,
port=parsed.port,
endpoint=parsed.endpoint,
api_key=parsed.api_key,
cors_origins=cors_origins,…
Manual fix · PyPI
pip install --upgrade "praisonai>=4.6.58"Sources