{"cve":"CVE-2026-40159","nvd":{"published":"2026-04-10T17:17:13.763","modified":"2026-10-26T22:10:00.163","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.5},"cwes":["CWE-200","CWE-214"],"references":["https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-pj2r-f9mw-vrcq"],"products":["praison:praisonai"],"source":"nvd","synced_at":"2026-10-26T22:26:44.656832877+00:00"},"epss":{"cve":"CVE-2026-40159","score":0.00182,"percentile":0.07712,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-pj2r-f9mw-vrcq","url":"https://osv.dev/vulnerability/GHSA-pj2r-f9mw-vrcq","summary":"PraisonAI Vulnerable to Sensitive Environment Variable Exposure via Untrusted MCP Subprocess Execution","modified":"2026-07-13T16:43:03.837645794Z","packages":[{"ecosystem":"PyPI","name":"praisonai","purl":"pkg:pypi/praisonai","ranges":["<4.5.128"],"fixed":["4.5.128"]}]},{"id":"PYSEC-2026-2918","url":"https://osv.dev/vulnerability/PYSEC-2026-2918","summary":"PraisonAI Vulnerable to Sensitive Environment Variable Exposure via Untrusted MCP Subprocess Execution","modified":"2026-07-13T16:33:02.907264790Z","packages":[{"ecosystem":"PyPI","name":"praisonai","purl":"pkg:pypi/praisonai","ranges":["<4.5.128"],"fixed":["4.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."]}