Description
PraisonAI (pip package praisonaiagents) before 1.6.78 contains an unsafe dynamic module loading vulnerability in AgentFlow._resolve_pydantic_class (src/praisonai-agents/praisonaiagents/workflows/workflows.py). When a workflow step uses a string output_pydantic reference, the framework locates and imports a sibling tools.py from the workflow file's directory via importlib exec_module without sandboxing, ignoring the PRAISONAI_ALLOW_*_TOOLS environment variables. An attacker who controls a workflow file and its sibling tools.py can execute arbitrary Python code with the workflow runner's privileges when the workflow is executed via WorkflowManager or after load_yaml.
Problem types
Product status
Any version before 1.6.78
1.6.78 (semver)
Credits
Nx7n
References
github.com/...isonAI/security/advisories/GHSA-4gfv-wg42-7jw5
github.com/...isonAI/security/advisories/GHSA-4gfv-wg42-7jw5 (GitHub Security Advisory (GHSA-4gfv-wg42-7jw5))
www.vulncheck.com/...fore-remote-code-execution-via-tools-py (VulnCheck Advisory: PraisonAI before 1.6.78 Remote Code Execution via tools.py)