# CVE-2026-40159: PraisonAI Exposes Sensitive Environment Variable via Untrusted MCP Subprocess Execution

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 5% of CVEs (2026-11-30)
- Published: 2026-04-10T16:57:11.623Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-pj2r-f9mw-vrcq, PYSEC-2026-2918
- Weaknesses: CWE-200, CWE-214
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- MervinPraison PraisonAI: < 4.5.128
- praisonai (PyPI): before 4.5.128
- praison praisonai: before 4.5.128

## Every score

- GitHub_M: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`

## References

- <https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-pj2r-f9mw-vrcq> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40159> (advisory)
- <https://github.com/MervinPraison/PraisonAI> (package)
- <https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.128> (web)
- <https://pypi.org/project/praisonai> (package)
- <https://github.com/advisories/GHSA-pj2r-f9mw-vrcq> (advisory)

## Sources

- CVE List: [CVE-2026-40159](https://www.cve.org/CVERecord?id=CVE-2026-40159), CVE Terms of Use, modified 2026-04-15
- GitHub Advisory Database: [GHSA-pj2r-f9mw-vrcq](https://github.com/advisories/GHSA-pj2r-f9mw-vrcq), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-40159](https://nvd.nist.gov/vuln/detail/CVE-2026-40159), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2918](https://osv.dev/vulnerability/PYSEC-2026-2918), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-40159 · Whole record: https://cve.day/CVE-2026-40159.json · Rebuilt by cve.day 2026-11-25T22:59:18.530Z
