Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. praisonaiagents
  4. ›
  5. CVE-2026-40153

CVE-2026-40153: PraisonAIAgents: Environment Variable Secret Exfiltration via os.path.expandvars() Bypassing shell=False in Shell Tool

April 10, 2026

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.

References

  • github.com/MervinPraison/PraisonAI
  • github.com/MervinPraison/PraisonAI/security/advisories/GHSA-v8g7-9q6v-p3x8
  • github.com/advisories/GHSA-v8g7-9q6v-p3x8
  • nvd.nist.gov/vuln/detail/CVE-2026-40153

Code Behaviors & Features

Detect and mitigate CVE-2026-40153 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.5.128

Fixed versions

  • 1.5.128

Solution

Upgrade to version 1.5.128 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-526: Cleartext Storage of Sensitive Information in an Environment Variable

Source file

pypi/praisonaiagents/CVE-2026-40153.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:17:55 +0000.