{"cve":"CVE-2026-40111","nvd":{"published":"2026-04-09T22:16:34.560","modified":"2026-10-26T22:10:00.163","status":"Analyzed","description":"PraisonAIAgents is a multi-agent teams system. Prior to 1.5.128, he memory hooks executor in praisonaiagents passes a user-controlled command string directly to subprocess.run() with shell=True at src/praisonai-agents/praisonaiagents/memory/hooks.py. No sanitization is performed and shell metacharacters are interpreted by /bin/sh before the intended command executes. Two independent attack surfaces exist. The first is via pre_run_command and post_run_command hook event types registered through the hooks configuration. The second and more severe surface is the .praisonai/hooks.json lifecycle configuration, where hooks registered for events such as BEFORE_TOOL and AFTER_TOOL fire automatically during agent operation. An agent that gains file-write access through prompt injection can overwrite .praisonai/hooks.json and have its payload execute silently at every subsequent lifecycle event without further user interaction. This vulnerability is fixed in 1.5.128.","cvss_v4":{"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-78"],"references":["https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-v7px-3835-7gjx","https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-v7px-3835-7gjx"],"products":["praison:praisonaiagents"],"source":"nvd","synced_at":"2026-10-26T22:26:44.656832877+00:00"},"epss":{"cve":"CVE-2026-40111","score":0.00229,"percentile":0.1358,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-v7px-3835-7gjx","url":"https://osv.dev/vulnerability/GHSA-v7px-3835-7gjx","summary":"PraisonAIAgents has an OS Command Injection via shell=True in Memory Hooks Executor (memory/hooks.py)","modified":"2026-06-29T12:26:25.837784135Z","packages":[{"ecosystem":"PyPI","name":"praisonaiagents","purl":"pkg:pypi/praisonaiagents","ranges":["<1.5.128"],"fixed":["1.5.128"]}]},{"id":"PYSEC-2026-487","url":"https://osv.dev/vulnerability/PYSEC-2026-487","summary":"PraisonAIAgents has an OS Command Injection via shell=True in Memory Hooks Executor (memory/hooks.py)","modified":"2026-07-13T16:15:16.313295300Z","packages":[{"ecosystem":"PyPI","name":"praisonaiagents","purl":"pkg:pypi/praisonaiagents","ranges":["<1.5.128"],"fixed":["1.5.128"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}