Summary
PraisonAI's Gateway server exposes a WebSocket endpoint at /ws and an agent topology endpoint at /info without requiring any authentication.
In affected versions, any network-accessible client can discover registered agents and send arbitrary messages to them and their tool sets, enabling unauthorized control and potential abuse of the multi-agent environment.
Affected context
This vulnerability affects deployments of PraisonAI where the Gateway server is reachable over a network (internal or external) and is running a version prior to 4.5.97.
The issue centers around:
- A WebSocket endpoint at
/wsthat accepts connections from any client - An information endpoint at
/infothat discloses agent topology
In this configuration, the gateway does not enforce authentication or session checks before allowing clients to enumerate agents or send them messages, leaving agent communication channels exposed to any party with network access.
Exploit preconditions
- Attack surface: Network-exposed PraisonAI Gateway server (e.g., over LAN, VPN, or internet).
- Required access: Ability to reach the
/wsand/or/infoendpoints over the network (no credentials needed). - Trigger point:
- Establishing a WebSocket connection to
/ws. - Issuing HTTP requests to
/infoto retrieve agent topology. - Sending crafted messages over the WebSocket to targeted agents or tool sets.
- Why exploitation is possible: The gateway fails to enforce authentication and authorization for these endpoints, treating all inbound connections as trusted and permitting unverified clients to discover and interact with agents.
Why this happens
The core issue is the absence of authentication and authorization checks on the PraisonAI Gateway's WebSocket and information endpoints, aligning with CWE-306: Missing Authentication for Critical Function.
Critical capabilities—discovering agent topology and sending messages to agents and their tools—are exposed without verifying the identity or permissions of the caller.
From a design standpoint, the gateway implicitly trusts any network client, rather than enforcing a session/token model, role-based access, or mutual authentication before granting access to sensitive multi-agent control functions.
Potential impact
- Unauthorized enumeration of all registered agents and their topology.
- Injection of arbitrary instructions or messages into agents and their tool sets.
- Abuse of agents to perform unintended actions, including data retrieval or modification within their configured capabilities.
- Impersonation of legitimate components in the multi-agent system, potentially corrupting workflows and decision-making.
- Lateral movement within the application ecosystem if agents can reach other internal services or data sources.
- Service disruption or denial-of-service by flooding agents with spurious or malformed requests.
General mitigation guidance
Mitigation should focus on enforcing strong, consistent access control around gateway endpoints and minimizing implicit trust in network clients.
Common defensive patterns include:
- Requiring authentication (e.g., API tokens, OAuth2, mTLS) for all WebSocket and HTTP endpoints that expose agent interactions or topology.
- Introducing authorization checks so that only permitted identities can enumerate agents or send them messages, with clear role definitions.
- Applying the principle of least privilege, limiting what authenticated clients can do and which agents or tools they can reach.
- Segregating the gateway onto restricted network segments (e.g., private subnets, VPN-only access) so that untrusted networks cannot directly reach it.
- Implementing secure-by-default configuration where remote access to multi-agent controls is disabled or tightly restricted unless explicitly configured.
- Logging and monitoring access to sensitive endpoints, along with rate limiting, to reduce the impact of misuse.
How teams detect issues like this
Effective detection typically combines code-level review, configuration checks, and runtime monitoring:
- Static analysis and code review:
- Identify WebSocket and HTTP handlers that perform critical operations without authentication/authorization checks.
- Flag any routes exposing topology or control functions that bypass the centralized auth middleware or access control components.
- Configuration and deployment reviews:
- Verify that gateway endpoints are bound to expected interfaces and aren't unintentionally exposed to wider networks.
- Check for missing or disabled auth mechanisms in gateway configuration and infrastructure (e.g., API gateway, reverse proxy rules).
- Runtime monitoring and logging:
- Track connection patterns to
/wsand/info, looking for access from unexpected IP ranges or anomalous request volumes. - Alert on agent messages originating from unknown or unapproved clients.
- Security testing:
- Incorporate automated and manual tests in CI/CD that attempt unauthenticated access to critical endpoints and fail the build if access is allowed.

