{"id":"CVE-2026-40153","published":"2026-04-09T21:27:45Z","modified":"2026-04-13T15:37:40Z","title":"PraisonAIAgents Affected by Environment Variable Secret Exfiltration via os.path.expandvars() Bypassing shell=False in…","vendor":"MervinPraison","product":"PraisonAIAgents","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00277,"percentile":0.20648,"provenance":"source"},"cwes":[{"id":"CWE-526","name":"Cleartext Storage of Sensitive Information in an Environment Variable"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-v8g7-9q6v-p3x8","tags":["x_refsource_CONFIRM"]}],"priority":{"score":9.3,"factors":[{"name":"EPSS percentile","points":4.13},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"mervinpraison","affectedVersions":[{"vendor":"MervinPraison","product":"PraisonAIAgents","versions":["< 1.5.128"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-13T15:28:34.665913Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"praisonaiagents","vulnerableRanges":["<1.5.128"],"patched":["1.5.128"],"from":["GHSA-v8g7-9q6v-p3x8","PYSEC-2026-2953"],"provenance":"source"}],"summary":{"text":"The PraisonAIAgents multi-agent teams system's execute_command function in shell_tools.py expands environment variables in command arguments with os.path.expandvars() despite running with shell=False, so the approval display shows unexpanded $VAR references that differ from what executes. An attacker who can get a crafted command through to execution, with a human reviewer approving it based on the displayed text, can exfiltrate secrets held in environment variables such as database credentials, API keys, and cloud access keys.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:06:23Z"},"euvd":{"id":"EUVD-2026-21176","exploited":false,"provenance":"source"}}