PraisonAI: Unauthenticated Information Disclosure of Agent Instructions via /api/agents in AgentOS
Date: 2026-04
Affected: pip/PraisonAI
Attack vector: prompt-injection
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2026-40151
CWE: CWE-200
CVSS: 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)

## Summary The AgentOS deployment platform exposes a `GET /api/agents` endpoint that returns agent names, roles, and the first 100 characters of agent system instructions to any unauthenticated caller. The AgentOS FastAPI application has no authentication middleware, no API key validation, and defaults to CORS `allow_origins=["*"]` with `host="0.0.0.0"`, making every deployment network-accessible and queryable from any origin by default. ## Details The `AgentOS._register_routes()` method at `src/praisonai/praisonai/app/agentos.py:118` registers all routes on a plain FastAPI app with no authentication dependencies: ```python # agentos.py:147-160 @app.get(f"{self.config.api_prefix}/agents") async def list_agents(): return { "agents": [ { "name": getattr(a, 'name', f'agent_{i}'), "role": getattr(a, 'role', None), "instructions": getattr(a, 'instructions', None)[:100] + "..." if getattr(a, 'instructions', None) and len(getattr(a, 'instructions', '')) > 100 else getattr(a, 'instructions', None), } for i, a in enumerate(self.agents) ] } ``` The `AgentAppConfig` at `src/praisonai-agents/praisonaiagents/app/config.py:12-55` has no authentication fields — no `api_key`, no `auth_middleware`, no `token_secret`. The only middleware added is CORS with wildcard origins: ```python # agentos.py:104-111 app.add_middleware( CORSMiddlewa


Mitigations:

Architectural layers (MAESTRO):