Advisory

PYSEC-2026-3537

Details, part 2 of 2. The advisory

Details

if result["case"] == "no_auth_list" and "pov_agent" not in json.dumps(result["body"]):
raise SystemExit("[poc] MISS: unauthenticated list endpoint did not expose agent id")
if result["case"] == "no_auth_list":
continue
body_text = json.dumps(result["body"], sort_keys=True)
if expected_marker not in body_text:
raise SystemExit(f"[poc] MISS: marker absent for {result['case']}")

print("[poc] HIT: unauthenticated clients invoked AgentTeam endpoints")
return 0

if __name__ == "__main__":
raise SystemExit(main())


## Impact

If an operator follows the documented remote-server pattern and exposes an `AgentTeam.launch()` server on a reachable interface, any network client can invoke the deployed agents without credentials.

Depending on the deployed agents, an unauthenticated caller may be able to:

- enumerate available agent IDs and names through `GET /{path}/list`;
- trigger model/API spend by repeatedly invoking agents;
- drive agents connected to local tools, internal APIs, SaaS integrations, browsers, files, or workflow actions;
- trigger side effects through per-agent endpoints even if the operator expected only the team endpoint to be used;
- access responses generated from connected private context, memory, or knowledge sources.

The impact is deployment-dependent, but the missing access control is in the framework's advertised network server path rather than in user application code.

## Affected-Version Sweep

Static sweep of release tags shows the unauthenticated `AgentTeam.launch()` handler and per-agent registration present in:

- `v4.6.33`
- `v4.6.39`
- `v4.6.40`
- `v4.6.56`
- `v4.6.57`

The issue remains present on current upstream main `2f9677abb2ea68eab864ee8b6a828fd0141612e1`.

The generated deploy API path was hardened between `v4.6.33` and `v4.6.39`, and remains hardened in `v4.6.57`. This supports the incomplete-fix/sibling-callsite classification: the fix did not cover `AgentTeam.launch()`.

## Root Cause

The `AgentTeam.launch()` FastAPI server is implemented as an independent route-registration path. It does not reuse the hardened API server authentication helper, the gateway bind-aware auth guard, or a shared server-auth policy.

The security-sensitive action is direct invocation of `agent.chat()` from a network request. The route has no access-control check before that call.

## Suggested Fix

Recommended approach:

1. Add a shared authentication helper for all network-facing agent invocation servers.
2. Make `AgentTeam.launch()` fail closed for non-loopback binds unless a token/API key is configured.
3. Require `Authorization: Bearer <token>` or an explicit documented API-key header for `POST /{path}`, `GET /{path}/list`, and `POST /{path}/{agent_id}`.
4. Default `AgentTeam.launch()` to `host="127.0.0.1"` unless an explicit unsafe/remote option plus auth is configured.
5. Add regression tests proving:
   - no token returns `401`;
   - wrong token returns `403`;
   - correct token can list agents;
   - correct token can invoke the team endpoint;
   - correct token can invoke the per-agent endpoint;
   - external bind without auth fails at startup.

If unauthenticated local development remains supported, require loopback binding and a loud explicit unsafe opt-out for externally bound unauthenticated servers.

## Severity

Recommended severity: Critical

Rationale:

- Network attack vector: the documented server supports remote access via `0.0.0.0`.
- Low complexity: a single POST request invokes the agent.
- No privileges: no credentials are required.
- No user interaction: once the server is exposed, the attacker directly sends requests.
- High confidentiality/integrity/availability impact depends on deployed agents and connected tools, but this is the same agent-control class as prior PraisonAI unauthenticated API advisories. The official remote-agent documentation explicitly discusses remote agents with tools, memory, knowledge, and auth headers, so the security-relevant configuration is not hypothetical.

If maintainers want to score based only on minimal agents with no tools and no private context, the lower-bound impact would still include unauthorized remote invocation and model/API spend.

## Notes

The direct single-agent `Agent.launch()` path in current source appears to share the same missing-auth design, but it raises `NameError: name '_server_lock' is not defined` before serving in the tested local source checkout. This report therefore makes the primary impact claim only for the confirmed working `AgentTeam.launch()` / `Agents.launch()` path.

The CLI `praisonai serve agents` surface advertises a `--api-key` option and should be reviewed by maintainers when applying a shared fix, but this submission does not depend on a CLI-specific bypass claim.

Sources & licences