{"vuln_id":"GHSA-8x8f-54wf-vv92","aliases":["CVE-2026-40289"],"description":"PraisonAI Browser Server allows unauthenticated WebSocket clients to hijack connected extension sessions","published_at":"2026-04-10T19:32:59Z","modified_at":"2026-11-16T16:00:10Z","first_seen_at":"2026-11-21T19:15:20.271120Z","severity":"critical","severity_source":"ghsa","cvss_score":9.1,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","cwe":["CWE-306"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-8x8f-54wf-vv92"},"matched_alias":null,"items":[{"id":2520,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-8x8f-54wf-vv92 / CVE-2026-40289: PraisonAI Browser Server allows unauthenticated WebSocket clients to hijack connected extension sessions","summary":"PraisonAI Browser Server allows unauthenticated WebSocket clients to hijack connected extension sessions\n\n### Summary\n`praisonai browser start` exposes the browser bridge on `0.0.0.0` by default, and its `/ws` endpoint accepts websocket clients that omit the `Origin` header entirely. An unauthenticated network client can connect as a fake controller, send `start_session`, cause the server to forward `start_automation` to another connected browser-extension websocket, and receive the resulting action/status stream back over that hijacked session. This allows unauthorized remote use of a connected browser automation session without any credentials.\n\n### Details\nThe issue is in the browser bridge trust model. The code assumes that websocket peers are trusted local components, but that assumption is not enforced.\n\nRelevant code paths:\n\n- Default network exposure: `src/praisonai/praisonai/browser/server.py:38-44` and `src/praisonai/praisonai/browser/cli.py:25-30`\n- Optional-only origin validation: `src/praisonai/praisonai/browser/server.py:156-173`\n- Unauthenticated `start_session` routing: `src/praisonai/praisonai/browser/server.py:237-240` and `src/praisonai/praisonai/browser/server.py:289-302`\n- Cross-connection forwarding to any other idle websocket: `src/praisonai/praisonai/browser/server.py:344-356`\n- Broadcast of action output back to the initiating unauthenticated client: `src/praisonai/praisonai/browser/server.py:412-423` and `src/praisonai/praisonai/browser/server.py:462-476`\n\nThe handshake logic only checks origin when an `Origin` header is present:\n\n```python\norigin = websocket.headers.get(\"origin\")\nif origin:\n    ...\n    if not is_allowed:\n        await websocket.close(code=1008)\n        return\n\nawait websocket.accept()\n```\n\nThis means a non-browser client can omit `Origin` completely and still be accepted.\n\nAfter that, any connected client can send `{\"type\":\"start_session\", ...}`. The server then looks for the first other websocket without a session and sends it a `start_automation` message:\n\n```python\nif client_conn != conn and client_conn.websocket and not client_conn.session_id:\n    await client_conn.websocket.send_text(json_mod.dumps(start_msg))\n    client_conn.session_id = session_id\n    sent_to_extension = True\n    break\n```\n\nWhen the extension-side connection responds with an observation, the resulting action is broadcast to every websocket with the same `session_id`, including the unauthenticated initiating client:\n\n```python\naction_response = {\n    \"type\": \"action\",\n    \"session_id\": session_id,\n    **action,\n}\n\nfor client_id, client_conn in self._connections.items():\n    if client_conn.session_id == session_id and client_conn != conn:\n        await client_conn.websocket.send_json(action_response)\n```\n\nI verified this on the latest local checkout: `praisonai` version `4.5.134` at commit `365f75040f4e279736160f4b6bdb2bdb7a3968d4`.\n\n### PoC\nI used `tmp/pocs/poc.sh` to reproduce the issue from a clean local checkout.\n\nRun:\n\n```bash\ncd \"/Users/r1zzg0d/Documents/CVE hunting/targets/PraisonAI\"\n./tmp/pocs/poc.sh\n```\n\nExpected vulnerable ou\n\nAffected packages: pip:PraisonAI, pip:praisonaiagents\nPatched: praisonaiagents 1.5.140, PraisonAI 4.5.139","url":"https://github.com/advisories/GHSA-8x8f-54wf-vv92","published_at":"2026-04-10T19:32:59Z","updated_at":"2026-11-16T16:00:10Z","fetched_at":"2026-11-21T19:15:18.416902Z","severity":"critical","cvss_score":9.1,"epss":0.00428,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"praisonaiagents","vuln_id":"CVE-2026-40289","vuln_ids":["CVE-2026-40289","GHSA-8X8F-54WF-VV92"],"tags":["ghsa","pip","CWE-306"],"cluster_id":2484,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2520","html":"https://vulnwatch.ve1ve2.com/item/2520"}}]}