Vulnerability · Published Apr 9, 2026 · Assigned by GitHub_M
CVE-2026-40153PraisonAIAgents Affected by Environment Variable Secret Exfiltration via os.path.expandvars() Bypassing shell=False in Shell Tool
High 7.4
In plain English
A high-severity security flaw in PraisonAIAgents from MervinPraison. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
PraisonAIAgents is a multi-agent teams system. Prior to 1.5.128, the execute_command function in shell_tools.py calls os.path.expandvars() on every command argument at line 64, manually re-implementing shell-level environment variable expansion despite using shell=False (line 88) for security. This allows exfiltration of secrets stored in environment variables (database credentials, API keys, cloud access keys). The approval system displays the unexpanded $VAR references to human reviewers, creating a deceptive approval where the displayed command differs from what actually executes. This vulnerability is fixed in 1.5.128.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | praisonaiagents | 1.5.128 | GHSA-v8g7-9q6v-p3x8 |
| PyPI | praisonaiagents | 1.5.128 | PYSEC-2026-2953 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| MervinPraison | PraisonAIAgents | < 1.5.128 |
Weakness: CWE-526 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N