GitHub advisory · PyPI
PraisonAI serve agents --api-key is ignored, allowing unauthenticated remote agent execution
Description
PraisonAI's praisonai serve agents command exposes --api-key as the documented
authentication control for production/external deployments, but the configured key is not
enforced on the public agent invocation compatibility endpoints.
An operator can start the server with --api-key and bind it to 0.0.0.0, but any network-
reachable caller can still invoke agents through POST /agents or POST /agents/ {agent_name} without Authorization, X-API-Key, a query token, or any other credential.
Confirmed vulnerable:
d5f1114aaf1a2e9f121a6e66b929149ca2201f1de5928449f73f66cc8af1de61621aa974ab255133Likely affected range: >= 4.6.34, <= 4.6.48.
This is distinct from CVE-2026-44338 / GHSA-6rmh-7xcm-cpxj, which covered the legacy Flask
api_server.py path before 4.6.34. This report concerns the newer FastAPI serve agents --api-key code path and is confirmed in v4.6.48.
The CLI accepts and forwards an API key:
src/praisonai/praisonai/cli/commands/serve.py:156 defines praisonai serve agentssrc/praisonai/praisonai/cli/commands/serve.py:162 exposes --api-keysrc/praisonai/praisonai/cli/commands/serve.py:175-176 forwards the supplied keysrc/praisonai/praisonai/cli/features/serve.py:191 handles the agents subcommandsrc/praisonai/praisonai/cli/features/serve.py:199 parses api_key into the configHowever, _create_agents_app() never uses config["api_key"] to create middleware or a
FastAPI auth dependency:
src/praisonai/praisonai/cli/features/serve.py:228 creates the FastAPI appsrc/praisonai/praisonai/cli/features/serve.py:287 registers POST {path} with no auth
dependencysrc/praisonai/praisonai/cli/features/serve.py:346 registers POST /agents/{agent_name}
with no auth dependencysrc/praisonai/praisonai/cli/features/serve.py:356-370 executes the registered agent
directlyThe same…
Manual fix · PyPI
pip install --upgrade "PraisonAI>=4.6.58"Sources