PraisonAI: Arbitrary code execution via unguarded `spec.loader.exec_module` in `agents_generator.py` - sibling of CVE-2026-44334
CVE-2026-47398 · GHSA-78r8-wwqv-r299 · published 2026-05-29
- Severity
- High
- CVSS score
- 8.1
- Chance of exploitation (EPSS)
- 0.50%
- Fixed in
- 4.6.40
- Exploitation Public proof of concept
- Automatable No
- Technical impact Total
- CISA SSVC
Arbitrary code execution with the privileges of the PraisonAI process. The attacker payload runs during tool registry construction — before any LLM interaction — so no API keys or model access are required for the exploit to succeed. In CI/CD and shared-server environments, any user who can write an agents.yaml or colocate a .py file achieves code execution as the service account.
Upgrade praisonai to 4.6.40 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.
| CVE | GHSA | Fixed in | What was patched | | --- | --- | --- | --- | | CVE-2026-40156 | GHSA-2g3w-cpc4-chr4 | 4.5.128 | CWD tools.py auto-load in toolresolver.py | | CVE-2026-40287 | GHSA-g985-wjh9-qxxc | 4.5.139 | Env-var gate added to toolresolver.py + api/call.py | | CVE-2026-44334 | GHSA-xcmw-grxf-wjhj | 4.6.32 | Missed sink in templates/tooloverride.py | | This finding | — | unfixed | Missed sinks in agentsgenerator.py | Every prior patch addressed a subset of exec_module call sites. The two sinks documented here were present throughout the entire fix sequence and remain unpatched.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| praisonai | PyPI | <= 4.6.39 | 4.6.40 |
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.