PraisonAI Exposes Sensitive Environment Variable via Untrusted MCP Subprocess Execution
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-200.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| MervinPraison | PraisonAI | before 4.5.128 | 4.5.128 | Patch available | CNA |
| — | PraisonAI (PyPI) | before 4.5.128 | 4.5.128 | Patch available | GHSA-pj2r-f9mw-vrcq |
- PraisonAI VendorMervinPraison Affected before 4.5.128 Fixed in 4.5.128 Patch available CNA
- PraisonAI (PyPI) Vendor— Affected before 4.5.128 Fixed in 4.5.128 Patch available GHSA-pj2r-f9mw-vrcq
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:* | before 4.5.128 | Vulnerable | MervinPraison |
- cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:* Versions before 4.5.128 Vulnerable ·MervinPraison
Remediation
- Fix · CNA PraisonAI (MervinPraison) Fixed in 4.5.128
- Fix · GHSA-pj2r-f9mw-vrcq PraisonAI (PyPI) Fixed in 4.5.128 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40159
- 2026-10-03 Alias added: GHSA-pj2r-f9mw-vrcq
References
More MervinPraison Praisonai vulnerabilities
- TI-2026-30083 Incomplete fix for CVE-2026-34935: Command Injection in MervinPraison/PraisonAI CVSS 3.1CRITICAL 9.8
- TI-2026-29070 PraisonAI: Critical RCE via `type: job` workflow YAML CVSS 3.1CRITICAL 9.8
- TI-2026-28940 PraisonAI has Server-Side Request Forgery via Unvalidated webhook_url in Jobs API CVSS 3.1CRITICAL 10.0
- TI-2026-28768 PraisonAI Affected by Remote Code Execution via YAML Deserialization in Agent Definition Loading CVSS 3.1CRITICAL 9.8
- TI-2026-27159 PraisonAI: OS Command Injection in MCPHandler.parse_mcp_command() CVSS 3.1CRITICAL 9.8
- TI-2026-27158 PraisonAI: Second-Order SQL Injection in `get_all_user_threads` CVSS 3.1CRITICAL 9.8
Sources
- CVE-2026-40159 · CVE Program
- CVE-2026-40159 · NVD
- FIRST EPSS
- GHSA-pj2r-f9mw-vrcq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences