Disclosure summary
### Summary `CodeAgent._execute_python()` executes LLM-generated Python code in a subprocess with the complete parent-process environment (`os.environ.copy()`), zero AST validation, zero import restrictions, and no sandbox enforcement — even when `CodeConfig(sandbox=True)` is explicitly set. This allows an attacker who can influence LLM output (via prompt injection in agent input, tool results, or ingested content) to exfiltrate all environment secrets (API keys, database credentials, cloud tokens) and execute arbitrary code on the host. ### Details `src/praisonai-agents/praisonaiagents/agent/code_agent.py` (lines 253–308): ```python def _execute_python(self, code: str, **kwargs) -> Dict[str, Any]: import subprocess import time import tempfile import os start_time = time.time() # Write code to temp file with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f: f.write(code) # ← No AST validation, no import blocking temp_file = f.name try: # Execute in subprocess (basic sandboxing) env = os.environ.copy() # ← FULL parent environment env.update(self._code_config.environment) result = subprocess.run( ["python", temp_file], capture_output=True, text=True, timeout=sel
Source-specific records & product guidance
Sources retain their own attribution and scoring. Follow the original record to confirm affected versions, fixed releases, and configuration conditions.
GitHub reviewed advisories · GHSA-2xv2-w8cq-5gxw
Open original source · Updated Oct 08, 2026
PraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secrets
GitHub reviewed package advisory. Version ranges and patches are independently attributed; executable descriptions and source code locations are excluded.
Source severity: CRITICAL
| Vendor | Product / association | Version / bounds |
|---|---|---|
| pip | praisonaiagents | Not supplied |
Indexed product associations
These cached associations support search and triage. Confirm applicability, platform conditions, and fixed versions in the original record.
| Vendor | Product | Version | Source / relationship |
|---|---|---|---|
| pip | praisonaiagents | Not supplied | GHSA-2xv2-w8cq-5gxw / vendor-listed |
Original records & references
- NIST NVD record
- CVE Program record
- GitHub — Reviewed advisory
GitHub repository matches
Repository matches are links and GitHub-supplied metadata only. They are not verified working proof-of-concept code. Each supported query is bounded to ten pages and at most 1,000 indexed results. This is not a complete index of GitHub or public exploit research. Coverage can also be limited by provider availability, rate limits, rejected metadata, incomplete search results, manual review, and the recorded refresh time.
No stored repository matches
Repository discovery has not recorded an update for this CVE yet.
Discovery progress
0 of 3 discovery queries finished. GitHub returned 0 indexed results; 0 malformed or disallowed results were rejected.
No discovery update has been recorded for this CVE.
View all 0 stored repository matches
PUBLISHED 2026-10-08T16:44:01+00:00
MODIFIED 2026-10-08T16:44:02+00:00
INGESTED 2026-10-11T00:25:13+00:00