{"id":"CVE-2026-40159","published":"2026-04-10T16:57:11Z","modified":"2026-04-15T14:48:42Z","title":"PraisonAI Exposes Sensitive Environment Variable via Untrusted MCP Subprocess Execution","vendor":"MervinPraison","product":"PraisonAI","tier":"tail","description":{"text":"PraisonAI is a multi-agent teams system. Prior to 4.5.128, PraisonAI’s MCP (Model Context Protocol) integration allows spawning background servers via stdio using user-supplied command strings (e.g., MCP(\"npx -y @smithery/cli ...\")). These commands are executed through Python’s subprocess module. By default, the implementation forwards the entire parent process environment to the spawned subprocess. As a result, any MCP command executed in this manner inherits all environment variables from the host process, including sensitive data such as API keys, authentication tokens, and database credentials. This behavior introduces a security risk when untrusted or third-party commands are used. In common scenarios where MCP tools are invoked via package runners such as npx -y, arbitrary code from external or potentially compromised packages may execute with access to these inherited environment variables. This creates a risk of unintended credential exposure and enables potential supply chain attacks through silent exfiltration of secrets. This vulnerability is fixed in 4.5.128.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00185,"percentile":0.08293,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-214","name":"Invocation of Process Using Visible Sensitive Information"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-pj2r-f9mw-vrcq","tags":["x_refsource_CONFIRM"]}],"priority":{"score":5.5,"factors":[{"name":"EPSS percentile","points":1.66},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"mervinpraison","affectedVersions":[{"vendor":"MervinPraison","product":"PraisonAI","versions":["< 4.5.128"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-15T14:48:28.211057Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"PraisonAI","vulnerableRanges":["<4.5.128"],"patched":["4.5.128"],"from":["GHSA-pj2r-f9mw-vrcq","PYSEC-2026-2918"],"provenance":"source"}],"summary":{"text":"PraisonAI's MCP (Model Context Protocol) integration, prior to 4.5.128, spawns stdio background servers from user-supplied command strings via Python's subprocess module and passes the entire host process environment to them by default. An attacker who can get a user to run an untrusted or compromised MCP command, such as one launched through a package runner like npx -y, can read inherited secrets like API keys, tokens, and database credentials, which requires user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:37Z"},"euvd":{"id":"EUVD-2026-21511","exploited":false,"provenance":"source"}}