All posts
Write-up ~6 min read

Fixed in one port, open in the other: PraisonAI’s unauthenticated AgentOS server

The TypeScript port of an agent server got a CVE and a fix for binding to every interface with no auth. The Python port kept the same defaults, so the documented quickstart served agent system prompts and agent invocation to anyone on the network.

Context: Sibling-port variant of CVE-2026-61426 (GHSA-6wjp-v33h-5cvq), fixed in the npm/TypeScript port only

Affected
praisonai (PyPI) <= 4.7.15 and praisonaiagents (PyPI) <= 1.7.13, patched in praisonai 4.8.0 / praisonaiagents 1.8.0
Weakness
CWE-306 (Missing Authentication for Critical Function) / CWE-1188 · Insecure Default Initialization of Resource
Reading
~6 min · 20 Nov 2026

Credit: I was the sole reporter on this advisory. The maintainer closed it as already fixed: the fix landed in PR #6337 and shipped in 4.8.0. The maintainer thanked me by handle in the 4.8.0 release notes, among the reporters whose findings were confirmed and already fixed. No CVE was assigned for this report.

When a project ships the same product in two languages, a security fix in one of them tells you where to look in the other. PraisonAI has a TypeScript port and a Python port of its “AgentOS” agent server. The TypeScript one got a CVE for binding to every network interface with no authentication, and it was fixed. The Python one had the same defaults and the same missing guard, and it didn’t get that fix.

This is the “sibling port” kind of incomplete fix. I covered the general method in variant analysis of incomplete fixes. This post walks through one case, and also explains why insecure defaults cost more on AI agent servers than on most software.

A little theory: the default is the security policy

Most software runs exactly as it ships. People copy the quickstart, it works, and they move on. So whatever the defaults are (the bind address, whether auth is on) becomes the real security posture of the typical deployment. MITRE has a name for this: CWE-1188, Insecure Default Initialization of Resource.

“You can turn on authentication” is not a control if authentication is off by default. Two defaults make it worse together:

  • Bind address. 127.0.0.1 means only this machine can connect. 0.0.0.0 means every interface: the LAN, the container network, and the internet if the host has a public IP or a forwarded port.
  • Auth that only turns on when configured. If the server adds its auth layer only when a key exists, then “no key” quietly means “no auth”, not “refuse to start”.

Put them together and you get CWE-306, Missing Authentication for Critical Function, and the deployer never chose it.

Why agent servers make it worse

A normal web app with an open endpoint leaks some data. An open agent server leaks more:

  • System prompts. An agent’s instructions often hold the deployer’s prompt engineering, guardrails, business rules, and sometimes pasted-in context or secrets. Reading them also makes jailbreaking that agent easier.
  • Tool invocation. Invoking an agent means invoking every tool it has: file access, HTTP fetching, code execution, database queries. Anyone who can chat with the agent can try to steer those tools with prompt injection.
  • Cost abuse. Every request spends the deployer’s LLM API credit. An open chat endpoint is a free proxy to a paid model.

The concrete finding

AgentOS is PraisonAI’s HTTP server for exposing agents, teams, and flows. The config class AgentAppConfig (exported as AgentOSConfig) in praisonaiagents/app/config.py shipped with these defaults:

praisonaiagents/app/config.py (<= 1.7.13)Python
host: str = "0.0.0.0"           # binds all interfaces
api_key: Optional[str] = None    # no key by default

_create_app() in praisonai/app/agentos.py registered every route first, and added the API-key middleware only if a key existed:

praisonai/app/agentos.py, _create_app() (<= 4.7.15)Python
self._register_routes(app)
launch_token = self.config.api_key or os.environ.get("PRAISONAI_AGENTOS_API_KEY")
if launch_token:
    app.add_middleware(build_api_key_middleware(launch_token, {"/health", "/"}))

serve() then bound to host or self.config.host, which is 0.0.0.0, and nothing stopped a public bind without a key. With the documented quickstart and no key set, these endpoints were open to anyone who could reach the port:

Endpoint What an unauthenticated caller gets
GET /api/agents Each agent’s name, role and instructions (the system prompt)
POST /api/chat Runs an agent
WS /api/chat/stream Runs an agent with streaming output
POST /api/teams/{team}/run Runs a team
POST /api/flows/{flow}/run Runs a flow
GET / Agent names

The TypeScript port had the same root cause, published as CVE-2026-61426 / GHSA-6wjp-v33h-5cvq. The fix there had two parts: the default host became 127.0.0.1, and a 0.0.0.0 bind without a key was refused. The Python port got neither.

Proving it

I confirmed it live on praisonai 4.7.15 / praisonaiagents 1.7.13. The victim runs the quickstart:

Victim: documented quickstart, no api_keyPython
from praisonai import AgentOS
from praisonaiagents import Agent

AgentOS(agents=[Agent(name="assistant", instructions="<secret system prompt>")]).serve(port=9000)

Any host on the network, with no credentials:

Attacker: no credentialsShell
curl http://VICTIM:9000/api/agents
# 200 {"agents":[{"name":"assistant","role":"Assistant","instructions":"<secret system prompt>"}]}

curl -X POST http://VICTIM:9000/api/chat -H 'Content-Type: application/json' -d '{"message":"..."}'
# 200 (agent invoked)

I also checked with FastAPI’s TestClient against a real AgentOS app built with the default config. GET /api/agents returned 200 with the full instructions, and the app’s middleware stack had no auth middleware at all.

How to find this in your own code

  • Sibling ports. When a project ships the same server in two languages (Python and TypeScript SDKs, a CLI and a library, a desktop and a server build), read every security advisory for one port and check the matching code in the others. Fixes rarely land in all of them at once.
  • Grep the defaults. Look for host = "0.0.0.0", --host 0.0.0.0 and uvicorn.run(..., host="0.0.0.0") in config classes and CLI defaults. Then look at the auth setup next to it.
  • Treat conditional auth as a warning sign. The pattern is if api_key: app.add_middleware(auth). Ask what happens when the key is empty. If the answer is “the server runs anyway, open, on all interfaces”, that’s the bug.
  • Test the built app, not the docs. Build the app with default config and list its middleware, or call a protected route without a token. The documentation says what can be secured. The default build shows what is.
  • For agent servers, list what an anonymous caller can reach: prompt-listing endpoints, chat endpoints, and anything that runs a team, flow or tool.

The fix

The fix shipped in PraisonAI 4.8.0 via PR #6337 (merge commit 95bc0a7). Based on the public PR:

  • AgentAppConfig.host now defaults to 127.0.0.1 instead of 0.0.0.0.
  • serve() fails closed. It raises RuntimeError on a non-loopback host when the app it serves was built without an API key (from AgentOSConfig.api_key or PRAISONAI_AGENTOS_API_KEY). The key is recorded when the app is built, so a cached app can’t get around the check.
  • Before starting, the server logs the host, the port, and whether auth is on.
  • The praisonai app CLI’s --host default also moved to 127.0.0.1. (The PR notes that one fallback CLI path still defaults to 0.0.0.0, but now fails closed when no API key is set.)

To expose the server on purpose, for example in Docker, you now set host="0.0.0.0" and an API key. A public bind without a key is refused. The 4.8.0 release notes apply the same rule to every built-in server: loopback by default, and a token required for any non-loopback bind.

The pattern to copy: refuse an unsafe combination at startup instead of quietly running in it. A server that won’t start on 0.0.0.0 without a key protects the people who never read the docs; a warning in the docs does not.

Impact

Anyone who ran the documented AgentOS quickstart on praisonai <= 4.7.15 without setting an API key served these to every host that could reach the port:

  • System prompt disclosure (CWE-200): the deployer’s instructions, guardrails and any embedded context.
  • Unauthenticated agent, team and flow execution: LLM cost abuse, plus a way to steer whatever tools the agents have through prompt injection, up to data exfiltration through those tools.

How bad it gets depends on what the agents can do and how reachable the host is. A laptop on a home network is a small risk. A cloud VM or a container with a published port is a much larger one.

Disclosure timeline

Date Event
2026-10-19 Reported via GitHub private advisory (GHSA-jj5m-4rrg-3w6v)
2026-11-14 Fix PR #6337 merged
2026-11-19 PraisonAI 4.8.0 released (praisonai 4.8.0 / praisonaiagents 1.8.0); release notes thank the reporter
2026-11-19 Advisory closed as already fixed, no CVE assigned
2026-11-20 This write-up

References

Takeaway

A fix in one port is a bug report for the others.

When a project ships the same server twice, check that each security fix landed in every copy, and make the safe default refuse to start rather than run open.