Vulnerability record · PyPI
PYSEC-0000-praisonai-GHSA-pvxx-r596-f5qj
Description
praisonai serve agents and praisonai serve unified both accept --api-key for authentication. The flag is parsed but never wired into the FastAPI app — no middleware, no header check, nothing. The server runs wide open regardless of what key you set. Tested on 4.6.50 from PyPI.
src/praisonai/praisonai/cli/features/serve.pyThe CLI defines --api-key in the arg spec (serve.py:199) and passes the parsed value into _create_agents_app(config). But that function never reads config["api_key"]. The FastAPI app gets created with no auth at all. Same thing in _create_unified_app.
The help text says --api-key <key> API key for authentication, so this isn't ambiguous — it's supposed to protect the server. It just doesn't.
$ grep -n "api_key" src/praisonai/praisonai/cli/features/serve.py
107: --api-key <key> API key for authentication
199: "api_key": {"default": None},
847: "api_key": {"default": None},
POST /agents — runs the full agent workflowPOST /agents/{name} — invokes a specific agentPOST /api/v1/agents/{id}/invoke — n8n integration endpointGET / — lists all endpointsGET /__praisonai__/discovery — service discoveryCVE-2026-44338 was about the legacy deploy/api.py hardcoding AUTH_ENABLED = False. That was fixed in 4.6.34. This bug is in the newer serve subsystem that shipped in the same release — the --api-key flag exists but was never connected to anything.
python3 -m venv /tmp/poc-venv
/tmp/poc-venv/bin/pip install praisonai==4.6.50 fastapi starlette httpx pyyaml
import sys, types, tempfile, os
# Stub heavy deps so we only test the serve auth logic
for m in…
Manual fix · PyPI
pip install --upgrade "praisonai>=4.6.58"Sources