UTC
High

PraisonAI: HTTPApproval dashboard renders tool arguments as raw HTML, allowing approval-page XSS to approve dangerous tools

CVE-2026-56840 · GHSA-63v4-w882-g4x2 · published 2026-06-18 · updated 2026-07-20

Severity
High
CVSS score
8.8
Chance of exploitation (EPSS)
0.38%
Fixed in
4.6.59
  • Exploitation Public proof of concept
  • Automatable No
  • Technical impact Total
  • CISA SSVC
What it is

An attacker who can influence an agent task or prompt enough to produce a dangerous tool call can embed a short XSS payload in the tool argument. When the human approver opens the HTTP approval page, the script can approve the pending dangerous tool call before the human explicitly clicks Approve or Deny. This bypasses the human-in-the-loop approval boundary for dangerous tools such as executecommand, executecode, delete_file, or other tools gated through HTTPApproval. If the agent continues after approval, the dangerous tool runs with the privileges of the PraisonAI process.

What to do

Upgrade praisonai to 4.6.59 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

Escape every untrusted value before inserting it into the approval HTML: toolname risklevel agent_name every argument key every argument value For example, use html.escape(str(value), quote=True) or a template engine that auto-escapes by default. Add regression tests that include ... in tool arguments and assert that the rendered page contains escaped text, not a script element. Minimal patch shape: Additional hardening: avoid inline JavaScript and add a restrictive Content Security Policy; keep the request id as an unguessable capability, but do not rely on it as an XSS defense; consider requiring a per-request decision token outside attacker-controlled rendered argument fields.

Affected
PackageRegistryAffectedFixed in
praisonaiPyPI>= 4.5.2, <= 4.6.584.6.59

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].