{"id":"CVE-2026-34935","kind":"vulnerability","aliases":["CVE-2026-34935","GHSA-9gm9-c8mq-vq7m"],"related":[],"title":"PraisonAI: OS Command Injection in MCPHandler.parse_mcp_command()","description":"### Summary\n\nThe `--mcp` CLI argument is passed directly to `shlex.split()` and forwarded through the call chain to `anyio.open_process()` with no validation, allowlist check, or sanitization at any hop, allowing arbitrary OS command execution as the process user.\n\n### Details\n\n`cli/features/mcp.py:61` (source) -> `praisonaiagents/mcp/mcp.py:345` (hop) -> `mcp/client/stdio/__init__.py:253` (sink)\n```python\n# source\nparts = shlex.split(command)\n\n# hop\ncmd, args, env = self.parse_mcp_command(command, env_vars)\nself.server_params = StdioServerParameters(command=cmd, args=arguments)\n\n# sink\nprocess = await anyio.open_process([command, *args])\n\n```\n\nFixed in commit `47bff65413beaa3c21bf633c1fae4e684348368c` (v4.5.69) by introducing a command allowlist:\n```python\nALLOWED_COMMANDS = {\"npx\", \"uvx\", \"node\", \"python\"}\nif cmd not in ALLOWED_COMMANDS:\n    raise ValueError(f\"Disallowed command: {cmd}\")\n```\n\n### PoC\n```python\n# tested on: praisonai==4.5.48\n# install: pip install praisonai==4.5.48\n# run: praisonai --mcp \"bash -c 'id > /tmp/pwned'\"\n# verify: cat /tmp/pwned\n# expected output: uid=1000(...) gid=1000(...) groups=1000(...)\n```\n\n### Impact\n\nAny deployment where the `--mcp` argument is influenced by untrusted input is exposed to full OS command execution as the process user. No authentication is required.","summary":"PraisonAI passes the --mcp command-line argument straight into a process launcher with no validation, so anyone who can influence that argument can run arbitrary commands as the process user. No authentication is needed to trigger it.","severity":"critical","cvss":9.8,"epss":0.00839,"exploited":false,"exploited_at":null,"products":[{"name":"praisonai","fixed":["4.5.69"],"affected":">= 4.5.15, < 4.5.69","ecosystem":"pypi"},{"name":"praison praisonai","fixed":["4.5.69"],"affected":">= 4.5.15, < 4.5.69","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["ai-agents","ai-tooling","cwe-78","mcp","praisonai","pypi","python"],"not_affected_if":["fixed-mcp-argument","no-untrusted-input","versions-outside-range"],"how_to_check":"- Check the installed version with `pip show praisonai`; affected versions are `>= 4.5.15` and `< 4.5.69`.\n- Search deployment scripts, service units and container commands for `praisonai --mcp` and see whether any part of that argument comes from user input or an external source.","fix":"- Upgrade `praisonai` to `4.5.69` or later.","status":"open","published_at":"2026-04-01T23:20:00+00:00","first_seen_at":"2026-11-16T16:03:24+00:00","triaged_at":"2026-11-16T16:04:44+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-11-16T16:04:44Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade `praisonai` to `4.5.69` or later.","reach":"unknown","title":"PraisonAI: unvalidated --mcp argument lets attackers run OS commands","impact":"high","summary":"PraisonAI passes the --mcp command-line argument straight into a process launcher with no validation, so anyone who can influence that argument can run arbitrary commands as the process user. No authentication is needed to trigger it.","audience":"developers","category":"ai-tooling","nicknames":[],"who_cares":["python","pypi","praisonai","mcp","ai-agents"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Attacker runs arbitrary OS commands as the process user","analyst_note":"","how_to_check":"- Check the installed version with `pip show praisonai`; affected versions are `>= 4.5.15` and `< 4.5.69`.\n- Search deployment scripts, service units and container commands for `praisonai --mcp` and see whether any part of that argument comes from user input or an external source.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["fixed-mcp-argument","no-untrusted-input","versions-outside-range"],"who_is_affected":"Systems that run PraisonAI with the --mcp argument set from untrusted input, such as a web request, a config value an outsider can edit, or an external integration. Installations where the argument is fixed by the operator and never influenced by outside input are much less exposed, though the sources do not spell out this boundary in full.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000803,"input_tokens":5141,"output_tokens":578,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':10A,18A '-34935':11A,19A '-78':30B '/tmp/pwned':195C,198C '1000':202C,204C,206C '253':118C '345':115C '4.5.48':183C,188C '47bff65413beaa3c21bf633c1fae4e684348368c':152C '61':112C '9gm9':14A 'agent':25B 'ai':24B,27B 'ai-ag':23B 'ai-tool':26B 'allow':101C,160C,170C 'allowlist':94C,158C 'anyio.open':89C,145C 'anyon':52B 'arbitrari':60B,102C 'arg':127C,140C,148C 'argument':42B,57B,76C,141C,213C 'authent':67B,231C 'await':144C 'bash':192C 'c':193C 'c8mq':15A 'call':86C 'cat':197C 'chain':87C 'check':95C 'cli':75C 'cli/features/mcp.py':111C 'cmd':126C,139C,167C,177C 'command':3A,8A,40B,61B,104C,124C,131C,132C,138C,147C,157C,161C,171C,176C,224C 'command-lin':39B 'commit':151C 'cve':9A,17A 'cwe':29B 'deploy':209C 'detail':110C 'direct':79C 'disallow':175C 'env':128C,133C 'execut':105C,225C 'expect':199C 'expos':220C 'f':174C 'fix':149C 'forward':83C 'full':222C 'ghsa':13A 'ghsa-9gm9-c8mq-vq7m':12A 'gid':203C 'group':205C 'hop':100C,116C,125C 'id':194C 'impact':207C 'influenc':55B,215C 'inject':4A 'input':218C 'instal':184C,186C 'introduc':155C 'launcher':47B 'line':41B 'mcp':7A,31B,38B,74C,130C,191C,212C 'mcp/client/stdio/__init__.py':117C 'mcphandler.parse':6A 'need':69B 'node':164C 'npx':162C 'os':2A,103C,223C 'output':200C 'param':136C 'part':122C 'pass':36B,78C 'pip':185C 'poc':178C 'praison':21A 'praisonai':1A,20A,22A,32B,35B,182C,187C,190C 'praisonaiagents/mcp/mcp.py':114C 'process':46B,64B,90C,108C,143C,146C,228C 'pypi':33B 'python':34B,120C,159C,165C,179C 'rais':172C 'requir':233C 'run':59B,189C 'sanit':97C 'self.parse':129C 'self.server':135C 'shlex.split':81C,123C 'sink':119C,142C 'sourc':113C,121C 'stdioserverparamet':137C 'straight':43B 'summari':72C 'test':180C 'tool':28B 'trigger':71B 'uid':201C 'untrust':217C 'user':65B,109C,229C 'uvx':163C 'v4.5.69':153C 'valid':50B,93C 'valueerror':173C 'var':134C 'verifi':196C 'vq7m':16A","nicknames":[],"mitigations":[],"who_affected":"Systems that run PraisonAI with the --mcp argument set from untrusted input, such as a web request, a config value an outsider can edit, or an external integration. Installations where the argument is fixed by the operator and never influenced by outside input are much less exposed, though the sources do not spell out this boundary in full.","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","cwe78","mcp","praisonai","pypi","python","vendor"],"campaign_type":null,"search_a":"'-2026':10A,18A '-34935':11A,19A '9gm9':14A 'c8mq':15A 'command':3A,8A 'cve':9A,17A 'ghsa':13A 'ghsa-9gm9-c8mq-vq7m':12A 'inject':4A 'mcp':7A 'mcphandler.parse':6A 'os':2A 'praison':21A 'praisonai':1A,20A,22A 'vq7m':16A","search_b":"'-78':30B 'agent':25B 'ai':24B,27B 'ai-ag':23B 'ai-tool':26B 'anyon':52B 'arbitrari':60B 'argument':42B,57B 'authent':67B 'command':40B,61B 'command-lin':39B 'cwe':29B 'influenc':55B 'launcher':47B 'line':41B 'mcp':31B,38B 'need':69B 'pass':36B 'praisonai':32B,35B 'process':46B,64B 'pypi':33B 'python':34B 'run':59B 'straight':43B 'tool':28B 'trigger':71B 'user':65B 'valid':50B","search_c":"'/tmp/pwned':195C,198C '1000':202C,204C,206C '253':118C '345':115C '4.5.48':183C,188C '47bff65413beaa3c21bf633c1fae4e684348368c':152C '61':112C 'allow':101C,160C,170C 'allowlist':94C,158C 'anyio.open':89C,145C 'arbitrari':102C 'arg':127C,140C,148C 'argument':76C,141C,213C 'authent':231C 'await':144C 'bash':192C 'c':193C 'call':86C 'cat':197C 'chain':87C 'check':95C 'cli':75C 'cli/features/mcp.py':111C 'cmd':126C,139C,167C,177C 'command':104C,124C,131C,132C,138C,147C,157C,161C,171C,176C,224C 'commit':151C 'deploy':209C 'detail':110C 'direct':79C 'disallow':175C 'env':128C,133C 'execut':105C,225C 'expect':199C 'expos':220C 'f':174C 'fix':149C 'forward':83C 'full':222C 'gid':203C 'group':205C 'hop':100C,116C,125C 'id':194C 'impact':207C 'influenc':215C 'input':218C 'instal':184C,186C 'introduc':155C 'mcp':74C,130C,191C,212C 'mcp/client/stdio/__init__.py':117C 'node':164C 'npx':162C 'os':103C,223C 'output':200C 'param':136C 'part':122C 'pass':78C 'pip':185C 'poc':178C 'praisonai':182C,187C,190C 'praisonaiagents/mcp/mcp.py':114C 'process':90C,108C,143C,146C,228C 'python':120C,159C,165C,179C 'rais':172C 'requir':233C 'run':189C 'sanit':97C 'self.parse':129C 'self.server':135C 'shlex.split':81C,123C 'sink':119C,142C 'sourc':113C,121C 'stdioserverparamet':137C 'summari':72C 'test':180C 'uid':201C 'untrust':217C 'user':109C,229C 'uvx':163C 'v4.5.69':153C 'valid':93C 'valueerror':173C 'var':134C 'verifi':196C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-03-31T11:14:24+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-9gm9-c8mq-vq7m","url":"https://github.com/advisories/GHSA-9gm9-c8mq-vq7m","severity":"critical","published_at":"2026-04-01T23:20:00+00:00","modified_at":"2026-11-16T15:58:57+00:00","first_seen_at":"2026-11-16T16:03:24+00:00","fetched_at":"2026-11-16T16:07:02+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-34935","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34935","severity":null,"published_at":"2026-04-03T23:17:05+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":170885,"url":"https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-9gm9-c8mq-vq7m","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":170886,"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-9gm9-c8mq-vq7m","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-03-31T11:14:24+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":170880,"url":"https://github.com/MervinPraison/PraisonAI/commit/47bff65413beaa3c21bf633c1fae4e684348368c","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00839,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-34935"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}