npm PraisonAI AgentOS Unauthenticated API Exposure
The npm `praisonai` package's TypeScript `AgentOS` HTTP server defaults to `0.0.0.0` and exposes unauthenticated API endpoints (`/api/agents`, `/api/chat`), allowing attackers to disclose agent configurations and invoke agents without authorization, leading to potential data exfiltration, unauthorized actions, and resource consumption.
The npm praisonai package, specifically versions >= 1.6.0 through 1.7.1, contains a critical vulnerability in its TypeScript AgentOS HTTP server component. This server defaults to binding on 0.0.0.0 (all network interfaces) and fails to implement any authentication or authorization checks for sensitive API endpoints. Attackers who can reach a running AgentOS instance can unauthenticatedly enumerate agent names, roles, and partial instructions via GET /api/agents, and crucially, can invoke configured agents via POST /api/chat. This directly contradicts PraisonAI's own security documentation regarding hardened API servers and exposes organizations using the affected versions to significant risks, including unauthorized data access, manipulation of systems through agent actions, and resource exhaustion.
Attack Chain
- Attacker identifies an internet-facing host running the
praisonaiAgentOSserver (e.g., on default port 8000), which is listening on0.0.0.0. - Attacker sends an unauthenticated
GETrequest to/api/agents(or a configuredapiPrefix) to enumerate active agent names, roles, and up to 100 characters of their instructions. - The
AgentOSserver responds with sensitive metadata, such as an agent named "finance-admin" with instructions like "poc SECRET: refund-wire-tool may alter customer balances". - Attacker crafts a malicious prompt or command based on the disclosed agent information and observed functionality.
- Attacker sends an unauthenticated
POSTrequest to/api/chat(orapiPrefix/chat), containing the malicious input targeted at a selected agent. - The
AgentOSserver invokes the target agent'schatfunction with the attacker's input, triggering unauthorized actions within the agent's configured environment. - Depending on the agent's capabilities (e.g., access to tools, external APIs, credentials, file system), this leads to data exfiltration, system modification, or resource consumption.
Impact
An attacker successfully exploiting this vulnerability can cause severe damage. The primary impact is unauthorized access and control over configured PraisonAI agents. This can lead to the compromise of sensitive data through GET /api/agents revealing internal workflows and specific instructions, or more critically, through POST /api/chat by inducing agents to exfiltrate data, interact with internal systems, or manipulate workflows. While the report does not claim arbitrary code execution by default, if agents are configured with access to tools (e.g., file system, shell execution, external APIs with credentials), unauthenticated invocation effectively becomes an entry point for those powerful capabilities, leading to potential complete system compromise or data destruction. All organizations deploying praisonai npm package versions >= 1.6.0, <= 1.7.1 in an exposed manner are at risk.
Recommendation
- Deploy the Sigma rules in this brief to your SIEM for webserver logs to detect unauthenticated access attempts to
/api/agentsand/api/chat. - Ensure your network perimeter blocks unsolicited inbound connections to
praisonai AgentOSinstances running on0.0.0.0and default ports (e.g., 8000) from untrusted networks. - Prioritize updating the
praisonainpm package to a fixed version once released; if an immediate patch is unavailable, implement custom authentication middleware for affectedAgentOSinstances. - Monitor web server logs for
GETrequests to/api/agentsandPOSTrequests to/api/chatoriginating from unexpected source IPs or without expected authentication headers, as detected by the rules.
Detection coverage 2
Detect Unauthenticated PraisonAI AgentOS Agent Listing
highDetects unauthenticated HTTP GET requests to the /api/agents endpoint of the PraisonAI AgentOS server, indicating information disclosure attempts.
Detect Unauthenticated PraisonAI AgentOS Agent Invocation
criticalDetects unauthenticated HTTP POST requests to the /api/chat endpoint of the PraisonAI AgentOS server, indicating unauthorized agent invocation.
Detection queries are available on the platform. Get full rules →