PraisonAI's recipe execution engine contains a policy enforcement gap where untrusted recipes can self-authorize the `execute_command` shell tool without operator approval by omitting the dangerous tool from TEMPLATE.yaml and instead declaring it in workflow.yaml with a self-approving `approve:` directive — circumventing the `allow_dangerous_tools=True` requirement entirely. Any organization running PraisonAI where users or external systems can supply recipe files is exposed to shell command execution at PraisonAI process privilege level; while not in CISA KEV, the exploit requires only crafting a two-file recipe bundle with a publicly documented PoC, and the package carries 104 prior CVEs indicating structural security debt. Patch to praisonai >= 4.6.61 immediately, restrict recipe sources to operator-controlled paths only, and audit all workflow.yaml files for unexpected `approve:` entries containing `execute_command`.
What is the risk?
High. CVSS 7.8 (AV:L/AC:L/PR:N/UI:R) accurately reflects the local-first attack surface with full CIA impact. Exploitation requires no privileges — only that an operator load a crafted recipe — making it accessible to any party who can influence recipe selection via shared libraries, CI/CD pipelines, or API access. In HTTP recipe-runner deployments where authenticated users can specify recipe names or URIs, this escalates to a remote vector. No EPSS data is available, no KEV listing, and no public scanner template exists, but the detailed PoC is embedded in the advisory itself, substantially lowering the bar for exploitation. The high prior CVE count for this package (104) suggests systemic security issues warranting broader review.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| PraisonAI | pip | >= 4.5.87, < 4.6.61 | 4.6.61 |
| PraisonAI Agents | pip | — | No patch |
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade praisonai to >= 4.6.61 (patched release) as the primary remediation.
-
Until patched: restrict recipe execution strictly to operator-vetted recipe files — block any user-supplied or external recipe URIs from reaching the recipe runner.
-
Audit all workflow.yaml files currently in use for unexpected top-level
approve:directives, especially any listingexecute_command,shell, or similar dangerous tools. -
For HTTP recipe-runner deployments: disable public or user-controlled recipe name/URI input until patched, or restrict to a locked allowlist.
-
Apply OS-level least privilege to the account running PraisonAI processes to bound blast radius if exploited.
-
Add detection: alert on any workflow.yaml containing
approve:with shell-adjacent tool names processed at runtime.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is GHSA-7qw2-w5rc-37x2?
PraisonAI's recipe execution engine contains a policy enforcement gap where untrusted recipes can self-authorize the `execute_command` shell tool without operator approval by omitting the dangerous tool from TEMPLATE.yaml and instead declaring it in workflow.yaml with a self-approving `approve:` directive — circumventing the `allow_dangerous_tools=True` requirement entirely. Any organization running PraisonAI where users or external systems can supply recipe files is exposed to shell command execution at PraisonAI process privilege level; while not in CISA KEV, the exploit requires only crafting a two-file recipe bundle with a publicly documented PoC, and the package carries 104 prior CVEs indicating structural security debt. Patch to praisonai >= 4.6.61 immediately, restrict recipe sources to operator-controlled paths only, and audit all workflow.yaml files for unexpected `approve:` entries containing `execute_command`.
Is GHSA-7qw2-w5rc-37x2 actively exploited?
No confirmed active exploitation of GHSA-7qw2-w5rc-37x2 has been reported, but organizations should still patch proactively.
How to fix GHSA-7qw2-w5rc-37x2?
1. Upgrade praisonai to >= 4.6.61 (patched release) as the primary remediation. 2. Until patched: restrict recipe execution strictly to operator-vetted recipe files — block any user-supplied or external recipe URIs from reaching the recipe runner. 3. Audit all workflow.yaml files currently in use for unexpected top-level `approve:` directives, especially any listing `execute_command`, `shell`, or similar dangerous tools. 4. For HTTP recipe-runner deployments: disable public or user-controlled recipe name/URI input until patched, or restrict to a locked allowlist. 5. Apply OS-level least privilege to the account running PraisonAI processes to bound blast radius if exploited. 6. Add detection: alert on any workflow.yaml containing `approve:` with shell-adjacent tool names processed at runtime.
What systems are affected by GHSA-7qw2-w5rc-37x2?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, AI workflow automation, recipe-based pipelines, multi-agent orchestration.
What is the CVSS score for GHSA-7qw2-w5rc-37x2?
GHSA-7qw2-w5rc-37x2 has a CVSS v3.1 base score of 7.8 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011 User Execution AML.T0050 Command and Scripting Interpreter AML.T0053 AI Agent Tool Invocation AML.T0081 Modify AI Agent Configuration AML.T0107 Exploitation for Defense Evasion Compliance Controls Affected
What are the technical details?
Original Advisory
## 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`. ## Technical Details `recipe.run()` checks the recipe policy unless `options["allow_dangerous_tools"]` is true. `_check_tool_policy()` gets the required tool list from `recipe_config.get_required_tools()`, which is backed by `TEMPLATE.yaml` `requires.tools`. The steps workflow execution path is separate: 1. `_execute_steps_workflow()` parses the workflow file with `YAMLWorkflowParser`. 2. `YAMLWorkflowParser` resolves `agents.*.tools`. 3. The same parser reads top-level `approve:` and stores it on `workflow.approve_tools`. 4. `Workflow.start()` calls `set_yaml_approved_tools(approve_tools)`. 5. The approval registry treats YAML-approved tools as approved. `execute_command` is listed as a default dangerous tool with `critical` risk and is decorated with `@require_approval(risk_level="critical")`. The policy gap is that recipe-level dangerous-tool enforcement does not inspect the workflow file that actually supplies and approves the tool. ### Why This Is Not Intended Behavior YAML `approve:` is an intended feature. This report is not claiming that workflow-level approval is inherently unintended. The unintended behavior is that the recipe dangerous-tool policy exposes an operator-facing explicit override, `allow_dangerous_tools=True`, but a recipe can avoid that policy by moving the dangerous tool declaration from `TEMPLATE.yaml requires.tools` into the steps workflow. The recipe still runs through the standard recipe runner path, and the same workflow can self-approve the critical tool. This conflicts with the documented safety model: - PraisonAI's approval docs describe approval as pausing an agent before a risky tool and asking a human or configured channel to allow or deny it. - The SDK approval docs describe a human-in-the-loop approval system for dangerous tool operations. - Security-environment documentation describes opt-in access for potentially dangerous operations and secure defaults for RCE prevention. - Policy-engine documentation describes policies that block dangerous operations and require approval for sensitive actions. A control recipe that declares `requires.tools: [execute_command]` is denied with: ```text Tool 'execute_command' is denied by default. Use allow_dangerous_tools=True to override. ``` The bypass recipe uses the same tool but omits it from `requires.tools`; it passes policy and reaches the recipe runner's dry-run state. ## PoV Run: ```bash python3 poc/poc.py ``` Expected output: ```json { "ok": true, "control_policy": "Tool 'execute_command' is denied by default. Use allow_dangerous_tools=True to override.", "control_recipe_status": "policy_denied", "bypass_policy": null, "bypass_recipe_dry_run_status": "dry_run", "workflow_approve_tools": [ "execute_command" ], "runner_tool_names": [ "execute_command" ], "command_stdout": "poc", "operator_env_auto_approve": null } ``` The PoV creates two temporary recipes: 1. A control recipe with `TEMPLATE.yaml requires.tools: [execute_command]`. `recipe.run()` returns `policy_denied`. 2. A bypass recipe with no dangerous tools in `TEMPLATE.yaml`, but with `workflow.yaml` declaring `execute_command` under an agent and `approve: [execute_command]`. `recipe.run(..., dry_run=True)` reaches `dry_run`, and the same parser/approval context permits a harmless `printf poc. ## PoC The PoV section above contains the local reproduction command, input, and decisive output. ## Impact If an operator runs an untrusted recipe, or exposes the recipe runner to users who can choose recipe names/URIs, the recipe can self-authorize a default-denied critical shell tool without the operator setting `allow_dangerous_tools=True`. Successful exploitation lets the workflow run `execute_command` with the privileges of the PraisonAI process if the agent reaches the tool call. The exact trigger depends on the workflow and model/tool-call path, but the policy boundary is already bypassed before execution. This can affect both local CLI use and HTTP recipe-runner deployments. The HTTP recipe runner defaults to localhost/no-auth and requires auth for non-localhost binding, so this report uses local/UI-required severity rather than claiming an unauthenticated network RCE by default. The local HTTP sidecar documentation also frames the sidecar as a localhost REST API for local/polyglot integration. If a deployment exposes that API to authenticated users who can choose recipe names or URIs, the same policy bypass can become an authenticated remote recipe-execution issue, but that is not the default severity claim. ### Severity Suggested severity: High. ## Suggested Fix Normalize and validate the actual workflow tool graph before recipe execution: - Parse the selected workflow file before or during `_check_tool_policy()`. - Include `workflow.yaml agents.*.tools`, `roles.*.tools`, included recipes, and other workflow-resolved tool lists in the dangerous-tool policy. - Treat `approve:` as an operator-supplied approval policy, not a recipe-controlled bypass of the recipe-level dangerous-tool gate. - If `approve:` remains recipe-controlled, ignore dangerous/default-denied tool entries unless the caller passed `allow_dangerous_tools=True` or an explicit external policy allowed that exact tool. - Add regression tests for: - dangerous tool in `TEMPLATE.yaml requires.tools` is denied; - dangerous tool in `workflow.yaml agents.*.tools` is also denied; - `approve: [execute_command]` does not bypass the recipe policy; - `allow_dangerous_tools=True` keeps the intended opt-in behavior. ## Affected Package/Versions - Repository: `MervinPraison/PraisonAI` - Package: `praisonai` - Components: - `src/praisonai/praisonai/recipe/core.py` - `src/praisonai/praisonai/recipe/models.py` - `src/praisonai-agents/praisonaiagents/workflows/yaml_parser.py` - `src/praisonai-agents/praisonaiagents/workflows/workflows.py` - `src/praisonai-agents/praisonaiagents/approval/registry.py` Validated affected: - current main `2f9677abb2ea68eab864ee8b6a828fd0141612e1` - `v4.6.57` - `v4.6.56` - `v4.6.10` - `v4.6.9` - `v4.5.128` - `v4.5.120` - `v4.5.96` - `v4.5.87` Suggested affected range: `>= 4.5.87, <= 4.6.57`. PyPI lists `PraisonAI 4.6.57` as the latest release on 2026-06-13. Earlier tested tags through `v4.5.85` failed in this source checkout before the tested workflow path due an unrelated `praisonaiagents.output.models` import error. They are not claimed fixed or unaffected. ## Advisory History Checked visible PraisonAI advisories and prior submissions for the same root cause, affected entrypoint, and exploit preconditions. No exact duplicate is identified in this report text. Adjacent advisories, where relevant, are listed in References or discussed above.
Exploitation Scenario
An attacker with the ability to supply a recipe — via a shared recipe library, CI/CD integration, or HTTP recipe-runner API — creates a two-file bundle: a TEMPLATE.yaml with an empty `requires.tools` list (passing the dangerous-tool policy check cleanly) and a workflow.yaml declaring `execute_command` in an agent's tools list plus `approve: [execute_command]` at the top level. The operator runs the recipe without `allow_dangerous_tools=True`. The recipe policy inspects only TEMPLATE.yaml, finds no dangerous tools, and permits execution. During workflow startup, `YAMLWorkflowParser` reads the `approve:` directive, `Workflow.start()` installs `execute_command` as YAML-approved into the approval registry, and the agent invokes the shell tool with attacker-controlled arguments — achieving RCE without triggering any policy denial or alert.
Weaknesses (CWE)
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Primary
CWE-863 Incorrect Authorization
Primary
CWE-94 Improper Control of Generation of Code ('Code Injection')
Primary
CWE-78 — Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'): The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
- [Architecture and Design] If at all possible, use library calls rather than external processes to recreate the desired functionality.
- [Architecture and Design, Operation] Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
GHSA-vmmj-pfw7-fjwp 9.9 Analysis pending
Same package: praisonai CVE-2026-47392 9.9 praisonaiagents: RCE via Python sandbox bypass
Same package: praisonai GHSA-vc46-vw85-3wvm 9.8 PraisonAI: RCE via malicious workflow YAML execution
Same package: praisonai GHSA-9qhq-v63v-fv3j 9.8 PraisonAI: RCE via MCP command injection
Same package: praisonai CVE-2026-39890 9.8 PraisonAI: YAML deserialization enables unauthenticated RCE
Same package: praisonai