GHSA-8579-rgg5-ph2m: praisonai: Discord approval bypass executes agent tools
GHSA-8579-rgg5-ph2m HIGHPraisonAI's DiscordApproval component contains a CVSS 8.8 authorization flaw where any member of the configured Discord channel can approve dangerous agentic tool calls — including shell commands, file writes, and deployments — by simply sending 'yes' after an approval prompt appears, with no verification of approver identity, message threading, or request binding. This directly undermines the human-in-the-loop safety control organizations rely on to gate high-risk AI agent actions: the AI system itself need not be compromised, only the oversight mechanism fails. While there is no CISA KEV listing or public exploit at time of publication, the attack requires only channel write access and a single keyword, making it trivially reproducible by any existing channel participant. Organizations using PraisonAI with Discord-gated dangerous tools should upgrade immediately to 4.6.59 and audit current approval channel membership pending validation of the fix.
What is the risk?
High. CVSS 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) accurately reflects the ease of exploitation and potential impact. Attack complexity is trivial — requires only channel membership and a single approval-keyword message with no exploit tooling. The vulnerability is particularly severe because it targets the safety control layer rather than the AI model itself: blast radius equals whatever dangerous tools the agent exposes behind approval, which can include arbitrary code execution, data destruction, and deployment operations. The Slack and Telegram backends share the absence of an explicit approver allowlist, widening the exposure surface across all three messaging backends. No active exploitation evidence as of publication, but the root cause is fully documented in the advisory.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| PraisonAI | pip | >= 4.5.2, <= 4.6.58 | 4.6.59 |
Do you use PraisonAI? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Upgrade praisonai to >= 4.6.59 immediately — this is the patched version.
-
If immediate upgrade is not possible: audit and restrict the Discord approval channel to explicitly authorized approvers only, removing any non-essential members.
-
Review Slack and Telegram approval configurations for similar unauthorized-approver exposure — both backends lack explicit approver allowlists even in the patched version.
-
Disable messaging approval for the highest-risk tools (shell execution, file deletion, deployments) until the fix is validated in your environment.
-
Audit agent action logs for unexpected approvals — look for approval decisions where the named approver is not a recognized team member.
-
Detection: monitor Discord channel history for approval-keyword messages from unexpected users following agent approval requests; these would appear as messages from non-approver accounts shortly after a PraisonAI approval prompt.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is GHSA-8579-rgg5-ph2m?
PraisonAI's DiscordApproval component contains a CVSS 8.8 authorization flaw where any member of the configured Discord channel can approve dangerous agentic tool calls — including shell commands, file writes, and deployments — by simply sending 'yes' after an approval prompt appears, with no verification of approver identity, message threading, or request binding. This directly undermines the human-in-the-loop safety control organizations rely on to gate high-risk AI agent actions: the AI system itself need not be compromised, only the oversight mechanism fails. While there is no CISA KEV listing or public exploit at time of publication, the attack requires only channel write access and a single keyword, making it trivially reproducible by any existing channel participant. Organizations using PraisonAI with Discord-gated dangerous tools should upgrade immediately to 4.6.59 and audit current approval channel membership pending validation of the fix.
Is GHSA-8579-rgg5-ph2m actively exploited?
No confirmed active exploitation of GHSA-8579-rgg5-ph2m has been reported, but organizations should still patch proactively.
How to fix GHSA-8579-rgg5-ph2m?
1. Upgrade praisonai to >= 4.6.59 immediately — this is the patched version. 2. If immediate upgrade is not possible: audit and restrict the Discord approval channel to explicitly authorized approvers only, removing any non-essential members. 3. Review Slack and Telegram approval configurations for similar unauthorized-approver exposure — both backends lack explicit approver allowlists even in the patched version. 4. Disable messaging approval for the highest-risk tools (shell execution, file deletion, deployments) until the fix is validated in your environment. 5. Audit agent action logs for unexpected approvals — look for approval decisions where the named approver is not a recognized team member. 6. Detection: monitor Discord channel history for approval-keyword messages from unexpected users following agent approval requests; these would appear as messages from non-approver accounts shortly after a PraisonAI approval prompt.
What systems are affected by GHSA-8579-rgg5-ph2m?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, human-in-the-loop workflows, agentic tool execution pipelines.
What is the CVSS score for GHSA-8579-rgg5-ph2m?
GHSA-8579-rgg5-ph2m has a CVSS v3.1 base score of 8.8 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts AML.T0049 Exploit Public-Facing Application AML.T0053 AI Agent Tool Invocation Compliance Controls Affected
What are the technical details?
Original Advisory
# DiscordApproval accepts unrelated channel messages as dangerous-tool approvals ## Summary `praisonai.bots.DiscordApproval` approves a pending dangerous tool call when it sees any later non-bot message in the configured Discord channel whose text is classified as approval, such as `yes`. The decision is not bound to: - a Discord reply to the approval message; - a Discord thread created for that request; - a Discord interaction/button callback for that request; - an explicit approver user allowlist; or - an approval nonce visible only to intended approvers. As a result, any user who can post in the configured approval channel can approve a pending high-risk tool call by sending `yes` after the approval message appears. The same local PoV also shows that the Slack and Telegram messaging approval backends have no explicit approver allowlist parameter, but the primary report-grade issue is the Discord backend's unthreaded channel cross-talk: the approving message does not need to be a reply or otherwise request-bound. ## Affected Product - Repository: `MervinPraison/PraisonAI` - Ecosystem: `pip` - Package: `praisonai` - Component: Python messaging approval backends - Primary affected file: `src/praisonai/praisonai/bots/_discord_approval.py` - Related sibling files: - `src/praisonai/praisonai/bots/_slack_approval.py` - `src/praisonai/praisonai/bots/_telegram_approval.py` - Latest PyPI version validated: `4.6.58` - Current `origin/main` validated: `1ad58ca02975ff1398efeda694ea2ab78f20cf3e` - Current `origin/main` tag validated: `v4.6.58` Suggested affected range: ```text pip:praisonai >= 4.5.2, <= 4.6.58 ``` Representative local sweep: ```text 4.5.0 Discord approval backend not present 4.5.2 vulnerable 4.5.128 vulnerable 4.6.9 vulnerable 4.6.10 vulnerable 4.6.56 vulnerable 4.6.57 vulnerable 4.6.58 vulnerable ``` ## Root Cause `DiscordApproval.request_approval()` posts an approval message to the configured channel and records the returned message id. `_poll_for_response()` then polls channel history with: ```python f"/channels/{channel_id}/messages?after={message_id}&limit=10" ``` For each later non-bot message, it reads `content`, classifies the text, and returns `ApprovalDecision(approved=True)` when the text is `approve`/`yes`. There is no check that the message is a Discord reply to the approval message, belongs to a request-specific thread, came from an intended approver, or contains a request-specific approval token. Important source evidence from `origin/main`: - `_discord_approval.py` lines 57-73: constructor accepts `token`, `channel_id`, `timeout`, and `poll_interval`; no approver allowlist. - `_discord_approval.py` line 239: polls all messages after the approval message in the configured channel. - `_discord_approval.py` lines 252-265: skips bot messages, classifies the remaining text, and approves when the keyword is `approve`. The Slack and Telegram backends are better request-scoped than Discord: - Slack uses `conversations.replies` for the approval message thread. - Telegram checks the callback/reply message id. However, both still lack an explicit approver identity parameter. They are included in the PoV and suggested fix because the authorization model should be consistent across all messaging approval backends. ## Local PoV Run against the latest local checkout: ```bash python3 poc/pov_prai_cand_029_messaging_approval_channel_member_bypass.py \ --repo ../../artifacts/repos/praisonai-v4.6.58 \ --json ``` The PoV is local-only. It mocks Slack, Telegram, and Discord API helpers in-process and does not contact those services. For Discord, the mock sequence is: 1. `DiscordApproval` posts a critical `execute_command` approval request to `D_APPROVAL_CHANNEL`. 2. The mocked channel-history endpoint returns a later ordinary non-bot channel message from `D_INTRUDER` with content `yes`. 3. `DiscordApproval` returns `approved=True` and `approver="D_INTRUDER"`. Observed output from `evidence/pov-v4.6.58.json`: ```json { "approval_from_unconfigured_channel_participant": { "discord": true, "slack": true, "telegram": true }, "backends": [ { "backend": "discord", "configured_channel_id": "D_APPROVAL_CHANNEL", "decision_approved": true, "decision_approver": "D_INTRUDER", "decision_reason": "Approved via Discord by intruder", "intruder_user": "D_INTRUDER" } ], "no_explicit_approver_allowlist_parameters": true, "vulnerable": true } ``` The command in the approval request is a harmless local sentinel: `touch /tmp/prai-cand-029`. The PoV stops at the approval decision; it does not execute the tool. ## Why This Is Not Intended Behavior This report does not claim that a deliberately private approval channel with only trusted approvers is unsafe by itself. The narrower issue is that the Discord backend treats an unrelated later channel message as the approval decision for a specific dangerous tool request. PraisonAI's approval documentation describes approval as a safety control that pauses before dangerous tools and asks a human or channel to allow or deny the specific request. A random later `yes` in the channel is not evidence that an intended approver reviewed that request. The existing Slack and Telegram implementations already show request-binding patterns that Discord lacks: - Slack scopes to replies for the approval message timestamp. - Telegram checks the callback/reply `message_id`. The Discord backend should provide at least the same request binding and should also support explicit approver identity checks for deployments where channel membership is broader than approval authority. ## Impact If an application uses `DiscordApproval` for dangerous tools such as shell commands, file writes, deletes, deployments, or other privileged operations, a low-privileged Discord user with write access to the configured approval channel can approve pending dangerous tool executions. This can lead to code execution, file modification, deployment changes, or data access with the privileges of the PraisonAI process, depending on which tools the agent exposes behind approval. The attacker does not need the LLM API key, shell access, repository access, or PraisonAI process access. They only need to be able to post an approval-looking message in the configured approval channel after the approval prompt appears. ## Severity Suggested severity: High. Rationale: - `AV`: the attacker interacts through a networked Discord channel. - `AC`: sending `yes` after an approval prompt is enough. - `PR`: the attacker needs permission to post in the configured approval channel, but no approver-specific permission. - `UI`: no separate victim interaction is needed after the prompt exists. - `S`: the vulnerable approval backend and approved tool run in the PraisonAI application's security scope. - `C/I/A`: approved dangerous tools can disclose, modify, or destroy data depending on the configured agent tools. ## Remediation Recommended fixes: 1. For Discord, require approvals to be tied to the request, not merely any later channel message. Use Discord interactions/buttons with opaque server-side request ids, or require a Discord reply whose `message_reference.message_id` matches the approval message. 2. Add explicit approver identity configuration to all messaging approval backends, for example `approver_user_ids` or `allowed_approvers`. 3. Reject approvals from users outside the configured approver set, even if the message appears in the configured channel. 4. Include a per-request nonce or opaque approval id in callbacks and verify it server side before returning `ApprovalDecision(approved=True)`. 5. Add regression tests for Discord where: - an unrelated later `yes` in the channel is ignored; - a reply from a non-approver is ignored; - a request-bound reply/callback from an allowed approver succeeds.
Exploitation Scenario
An attacker who holds write access to a PraisonAI Discord approval channel monitors the channel for incoming approval requests. When the AI agent triggers a dangerous operation such as 'execute: rm -rf /data/backups' or 'deploy to production', it posts an approval request message to the channel. The attacker immediately sends 'yes' — no reply threading, no nonce, no special formatting required. PraisonAI's _poll_for_response() fetches messages after the approval message ID, classifies the attacker's message as matching the approval keyword, and returns ApprovalDecision(approved=True) with the attacker recorded as approver. The dangerous tool executes with PraisonAI process privileges. The attacker requires no access to the LLM API, the host system, or the PraisonAI codebase — only Discord channel write permission, which may be held by a broad set of team members or external collaborators depending on channel configuration.
Weaknesses (CWE)
CWE-345 Insufficient Verification of Data Authenticity
Primary
CWE-863 Incorrect Authorization
Primary
CWE-345 — Insufficient Verification of Data Authenticity: The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-61447 10.0 PraisonAI: RCE via unsandboxed LLM code execution
Same package: praisonai CVE-2026-61445 9.9 PraisonAI: AICoder root RCE via unsanitized tool calls
Same package: praisonai CVE-2026-47392 9.9 praisonaiagents: RCE via Python sandbox bypass
Same package: praisonai GHSA-vmmj-pfw7-fjwp 9.9 praisonai: sandbox escape gives RCE via codeMode tool
Same package: praisonai GHSA-vc46-vw85-3wvm 9.8 PraisonAI: RCE via malicious workflow YAML execution
Same package: praisonai