Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
CVE-2026-57142
Summary
PraisonAI recipe execution has a dangerous-tool policy that is supposed to block default-denied tools unless the caller explicitly passes `allow_dangerous_tools=True`. That policy only checks tools declared in `TEMPLATE.yaml` `requires.tools`. For steps-based recipes, the actual execution path loads 'workflow.yaml' with 'YAMLWorkflowParser'. That parser resolves agent-level 'tools:' declarations and preserves top-level 'approve:'. 'Workflow.start()' then installs those YAML-approved tools into the approval context. As a result, an untrusted recipe can omit 'execute_command' from 'TEMPLATE.yaml requires.tools', declare it in 'workflow.yaml agents.*.tools', and add top-level 'approve: [execute_command]'. The caller did not set 'allow_dangerous_tools=True', but the recipe policy allows the recipe and the workflow approval path self-approves the critical shell tool. The local PoV uses a harmless 'printf' canary and explicitly unsets 'PRAISONAI_AUTO_APPROVE'. This issue affects PraisonAI versions from 4.5.87 through 4.6.60.
- LOW
- LOCAL
- HIGH
- UNCHANGED
- REQUIRED
- NONE
- HIGH
- HIGH
CWE-78 - OS Command Injection
The OS command injection weakness (also known as shell injection) is a vulnerability which enables an attacker to run arbitrary OS commands on a server. This is done by modifying the intended downstream OS command and injecting arbitrary commands, enabling the execution of unauthorized OS commands. This has the potential to fully compromise the application along with all of its data, and, if the compromised process does not follow the principle of least privileges, it may compromise other parts of the hosting infrastructure as well. This weakness is listed as number ten in the 'CWE Top 25 Most Dangerous Software Weaknesses'.
References
Advisory Timeline
- Published