PraisonAI vulnerable to arbitrary file write via path traversal in `praisonai recipe unpack`
CVE-2026-40157 · GHSA-99g3-w8gr-x37c · published 2026-04-10 · updated 2026-11-16
- Severity
- Critical
- CVSS score
- 9.4
- Chance of exploitation (EPSS)
- 0.39%
- Fixed in
- 4.5.128
- Exploitation Public proof of concept
- Automatable No
- Technical impact Total
- CISA SSVC
| Path | Traversal blocked? | |------|--------------------| | praisonai recipe pull | Yes -- uses safeextractall | | praisonai recipe publish | Yes -- uses safeextractall | | praisonai recipe unpack | No -- raw tar.extract() | An attacker needs to get a victim to unpack a malicious .praison bundle -- say, through a shared recipe repository, a link in a tutorial, or by sending it to a colleague directly. Depending on filesystem permissions, an attacker can overwrite shell config files (.bashrc, .zshrc), cron entries, SSH authorized_keys, or project files in parent directories. The attacker controls both the path and the content of every written file.
Upgrade praisonai to 4.5.128 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Replace the raw extraction loop with safeextractall:
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| praisonai | PyPI | >= 2.7.2, < 4.5.128 | 4.5.128 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- CriticalMCP Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
- CriticalPraisonAI: AICoder Arbitrary File Write and Command Execution via LLM Tool Callspraisonai
- CriticalPraisonAI: Code Injection via f-string Interpolation in Deploy API Server Generationpraisonai
- CriticalPraisonAI has a Browser Server WebSocket origin validation bypass via unanchored regex (patch bypass of CVE-2026-40289 / GHSA-8x8f-54wf-vv92praisonai
- CriticalPraisonAI: Arbitrary File Read/Write via `multiedit` Tool Without Path Validationpraisonai
- CriticalPraisonAI: Unauthenticated RCE via Jobs API + Approval Bypasspraisonaiagents, praisonai
- CriticalPraisonAI: AgentOS remains unauthenticated after incomplete fix version and allows remote agent invocationpraisonai
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.