CVE-2026-40153
MEDIUM 6.5CVSS 3.1PraisonAIAgents: Environment Variable Secret Exfiltration via os.path.expandvars() Bypassing shell=False in Shell Tool
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.
- Published
- 9 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-526
- Also known as
- GHSA-v8g7-9q6v-p3x8PYSEC-2026-2953
- Sources
- NVDJSONOSV GHSA-v8g7-9q6v-p3x8JSONOSV PYSEC-2026-2953JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | praison | praisonaiagentscpe:2.3:a:praison:praisonaiagents:*:*:*:*:*:*:*:* |
< 1.5.128 | 1.5.128 |
| OSV | PyPI | praisonaiagents | < 1.5.128 | 1.5.128 |
References
- https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-v8g7-9q6v-p3x8 · Exploit, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-40153 · ADVISORY
- https://github.com/MervinPraison/PraisonAI · PACKAGE
- https://pypi.org/project/praisonaiagents · PACKAGE
- https://github.com/advisories/GHSA-v8g7-9q6v-p3x8 · ADVISORY
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 9 Apr 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 10 Apr 2026)