Summary
PraisonAI's legacy Flask API server is shipped with authentication disabled by default in affected versions, allowing unauthenticated access to sensitive endpoints.
Any client that can reach this server can list configured agents via /agents and invoke workflows defined in agents.yaml through /chat without presenting a token, potentially leading to unauthorized task execution and data exposure.
Affected context
The vulnerability appears in deployments of PraisonAI (versions 2.5.6 to before 4.6.34) that:
- Enable and expose the legacy Flask API server
- Rely on network location or environment isolation instead of explicit authentication
- Make
/agentsand/chatendpoints reachable from other services, users, or networks
In these conditions, the API behaves as if it were fully trusted, even for unauthenticated callers, leading to unintended access to agent configuration and workflow execution.
Exploit preconditions
- Attack surface: HTTP(S) interface of the legacy Flask API server.
- Required access: Network-level ability to reach the Flask service (e.g., same host, internal network, VPN, or misconfigured public exposure); no credentials or tokens are required.
- Trigger point: Direct requests to endpoints such as:
GET /agentsto enumerate configured agentsPOST /chat(or similar) to initiateagents.yamlworkflows- Why exploitation is possible: Authentication and authorization checks are disabled by default in the legacy server, so it trusts any caller and exposes workflow-triggering functionality without verifying identity or permissions.
Why this happens
This issue stems from the legacy Flask API server being designed or configured to run with authentication disabled by default, leaving critical endpoints unprotected.
Functionality that should be bound to an authenticated and authorized user context (listing agents and triggering multi-agent workflows from agents.yaml) is instead exposed over a network boundary with no access control.
Conceptually, this maps to:
- CWE-306: Missing Authentication for Critical Function, because sensitive operations are offered without requiring a user to prove their identity.
- CWE-668: Exposure of Resource to Wrong Sphere, since internal orchestration capabilities are made available to any network client that can connect.
- CWE-1188: Insecure Default Initialization of Resource, as the default configuration favors convenience over security by not enforcing authentication out of the box.
Potential impact
- Unauthorized triggering of multi-agent workflows that may perform actions on connected systems or external services.
- Exposure of agent configurations and underlying prompts, tools, or integration details via
/agents. - Abuse of the system as an unintended automation backend (e.g., sending messages, calling APIs, or processing data) on behalf of the attacker.
- Indirect data leakage if workflows interact with sensitive information sources or privileged APIs.
- Service disruption or unexpected resource consumption by repeatedly invoking workflows.
General mitigation guidance
Effective mitigations focus on enforcing strong access control and securing default deployments:
- Require authentication and authorization for all operational endpoints that list agents or trigger workflows, using token-based or similarly robust schemes.
- Adopt secure-by-default configurations where new deployments start with access controls enabled and explicit opt-in is required to relax them.
- Restrict network exposure of orchestration APIs using firewalls, service meshes, or reverse proxies so that only trusted components can reach the legacy server.
- Apply the principle of least privilege to associated credentials and integrations used by agents, limiting the damage if workflows are triggered unexpectedly.
- Provide clear, security-focused deployment guidance and templates that steer operators away from running orchestration APIs without authentication.
How teams detect issues like this
Detection typically combines configuration inspection, code review, and runtime monitoring:
- Configuration review: Check deployment manifests, environment variables, and Flask configuration to verify that authentication middleware or token checks are enabled for
/agents,/chat, and related endpoints. - Code review: Look for routes in the legacy Flask server that:
- Expose orchestration or workflow-triggering capabilities, and
- Are not wrapped with authentication/authorization decorators or middleware.
- Static analysis/policy checks: Use automated tools or policy-as-code to flag services that:
- Listen on network interfaces without enforcing authentication, or
- Define "admin" or "orchestration" routes without access control.
- Runtime monitoring: Inspect access logs for unauthenticated calls to sensitive endpoints (e.g.,
/agents,/chat) and alert on suspicious usage patterns, especially from unexpected IP ranges.

