Summary
PraisonAI's agent-serving API can accept requests to invoke configured agents without verifying credentials, even when an API key is supplied to the server. A network caller who can reach the affected endpoints may trigger agent actions and access results without the intended authentication control.
Affected context
The issue occurs in PraisonAI deployments using the praisonai serve agents command during the affected release range, where an API key is accepted as a startup option but authentication is not enforced for the agent POST endpoints. Risk depends on network exposure, the agents configured by the deployment, and the permissions or data available to those agents.
Exploit preconditions
- Attack surface: Network-accessible PraisonAI agent-serving HTTP API
- Required access: Network connectivity to the service; a valid API key is not required by the affected endpoints
- Trigger point: POST requests to
/agentsor/agents/{agent_name} - Why exploitation is possible: The endpoint handlers do not authenticate callers before processing agent invocation requests
Why this happens
The server accepts an API-key configuration value without consistently applying an authentication check to the agent POST routes. This creates a mismatch between the documented or configured security boundary and the behavior of the request handlers. The pattern maps to CWE-306, Missing Authentication for Critical Function, because sensitive functionality remains reachable without verifying the identity of the caller.
Potential impact
- Unauthorized callers may invoke configured agents
- Agent outputs or connected data may be exposed
- Agents may perform unintended actions using their configured permissions
- Costs, resource consumption, or downstream service activity may increase
- An attacker could potentially use agent capabilities to affect connected systems
General mitigation guidance
Mitigation generally focuses on enforcing authentication at every route that
performs or initiates privileged agent operations.
Common defensive patterns include:
- Applying centralized authentication middleware to all agent invocation endpoints
- Requiring valid credentials before request parsing or agent execution
- Returning consistent authorization failures for unauthenticated requests
- Separating authentication from optional API-key configuration so security controls cannot be silently bypassed
- Restricting network exposure through private interfaces, gateways, or authenticated reverse proxies
- Running agents with least-privilege identities and narrowly scoped access to tools and data
- Limiting agent capabilities and applying authorization checks to sensitive operations
How teams detect issues like this
Organizations can look for:
- Static analysis and code review checks confirming authentication middleware covers every agent POST route
- Tests that submit requests without credentials and verify that execution does not occur
- Route inventories compared against authentication and authorization policies
- API gateway or service-mesh policies requiring identity verification for agent endpoints
- Monitoring for unauthenticated requests, unusual invocation volume, and agent activity without corresponding identity records
- Automated security review tools that flag configured authentication controls which are not enforced by request handlers

