PraisonAI has Template Injection in Agent Tool Definitions
CVE-2026-39891 · GHSA-hwg5-x759-7wjg · published 2026-04-08 · updated 2026-04-09
- Severity
- High
- CVSS score
- 8.8
- Chance of exploitation (EPSS)
- 0.57%
- Fixed in
- 4.5.115
- Exploitation Public proof of concept
- Automatable No
- Technical impact Total
- CISA SSVC
Attackers can execute arbitrary system commands with the privileges of the running process by injecting malicious template expressions through agent instructions. This compromises the host system, enabling data theft, ransomware deployment, or lateral movement.
Upgrade praisonai to 4.5.115 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.
1. Input Sanitization: Implement strict whitelist validation for file content 2. Contextual Escaping: Auto-escape template syntax characters (e.g., {{ }}) in user input using Jinja2 autoescape=True 3. Sandboxing: Restrict template execution environments using secure eval modes 4. Approval Hardening: Require manual approval for file creation operations in production
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| praisonai | PyPI | <= 4.5.114 | 4.5.115 |
1 registered MCP server installs an affected version today, by the dependency versions a fresh install resolves.
- io.github.MervinPraison/praisonaipraisonai@2.3.42
- CriticalUnauthenticated Remote Code Execution in Langflow via Public Flow Build EndpointlangflowExploited
- CriticalRay is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding AttackrayExploited
- CriticalLangflow Unauth RCElangflow, langflow-baseExploited
- HighLiteLLM: Authenticated command execution via MCP stdio test endpointslitellmExploited
- CriticalMLflow vulnerable to remote code execution on unauthenticated servers via third-party scorer deserialization importing caller-placed artifacmlflow
- CriticalAgno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`agno
- 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.