{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-40159","id":"CVE-2026-40159","title":"PraisonAI Exposes Sensitive Environment Variable via Untrusted MCP Subprocess Execution","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 subproces","descriptionLong":"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.","published":"2026-04-10T16:57:11.623Z","updated":"2026-10-28T02:30:56.760732091Z","reserved":"2026-04-09T19:31:56.014Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["MervinPraison PraisonAI"],"affectedProducts":[{"vendor":"MervinPraison","product":"PraisonAI","defaultStatus":null,"versions":[{"version":"< 4.5.128","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"praisonai","purl":"pkg:pypi/praisonai","ranges":["<4.5.128"],"fixed":["4.5.128"],"advisory":"GHSA-pj2r-f9mw-vrcq"}],"cwes":["CWE-200","CWE-214"],"aliases":["GHSA-pj2r-f9mw-vrcq","PYSEC-2026-2918"],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-pj2r-f9mw-vrcq","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40159.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40159","tags":["advisory"]},{"url":"https://github.com/MervinPraison/PraisonAI","tags":["package"]},{"url":"https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.128","tags":["web"]},{"url":"https://pypi.org/project/praisonai","tags":["package"]},{"url":"https://github.com/advisories/GHSA-pj2r-f9mw-vrcq","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00185,"epssPercentile":0.08226,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-40159","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40159","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-40159","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-pj2r-f9mw-vrcq","ok":true,"note":"GHSA-pj2r-f9mw-vrcq"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-40159","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}