PraisonAIAgents: Environment Variable Secret Exfiltration via os.path.expandvars() Bypassing shell=False in Shell Tool
CVE-2026-40153 · GHSA-v8g7-9q6v-p3x8 · published 2026-04-10
- Severity
- High
- CVSS score
- 7.4
- Chance of exploitation (EPSS)
- 0.28%
- Fixed in
- 1.5.128
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
Secret exfiltration: All environment variables accessible to the process are exposed, including database credentials (DATABASEURL), cloud keys (AWSSECRETACCESSKEY, AWSACCESSKEYID), API tokens (OPENAIAPIKEY, ANTHROPICAPIKEY), and any other secrets passed via environment. Deceptive approval: The approval UI shows $VAR references while the system executes with expanded secrets, undermining the human-in-the-loop security control. Users familiar with shell=False semantics will expect no variable expansion. Automated environments at highest risk: CI/CD pipelines and production deployments using PRAISONAIAUTOAPPROVE=true, AutoApproveBackend, or YAML tool pre-approval have no human review gate.
Upgrade praisonaiagents to 1.5.128 or later.
Remove os.path.expandvars() from command argument processing. Only keep os.path.expanduser() for tilde expansion (which is safe — it only expands ~ to the home directory path):
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| praisonaiagents | PyPI | < 1.5.128 | 1.5.128 |
- CriticalLiteLLM has SQL Injection in Proxy API key verificationlitellmExploited
- Criticaln8n Vulnerable to Remote Code Execution via Expression Injectionn8n, n8nExploited
- HighLiteLLM has a sandbox escape in custom-code guardraillitellmExploited
- HighLangflow affected by Remote Code Execution via validate_code() exec()langflowExploited
- CriticalJupyter MCP Server: Browser DNS rebinding can hijack the Jupyter backend through management routesjupyter-mcp-server
- Criticalmem0ai Databricks vector store vulnerable to SQL injectionmem0ai
- CriticalPraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secretspraisonaiagents
- CriticalPraisonAI: Unauthenticated RCE via Jobs API + Approval Bypasspraisonaiagents, praisonai
- CriticalPraisonAI: MCP SSE transport binds 0.0.0.0 with no authentication and no Origin validation; bundled SecurityConfig is never wired inpraisonaiagents
- CriticalPraisonAI AgentTeam.launch exposes unauthenticated remote agent listing and invocation endpointspraisonaiagents
- CriticalPraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)praisonaiagents, praisonai
- CriticalPraisonAI Browser Server allows unauthenticated WebSocket clients to hijack connected extension sessionspraisonaiagents, praisonai
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.