CVE-2026-57128: PraisonAI Unauthenticated Event Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-35w5-pcw4-jx94
CVSS 4.3
CWE-306
Published
Advisory Summary

CVE-2026-57128 is a MODERATE (CVSS 4.3) unauthenticated event injection vulnerability (CWE-306: Missing Authentication for Critical Function) affecting PraisonAI libraries in the PyPI ecosystem. The issue involves unauthenticated event injection via sse `/publish` endpoint. Remediation is available by upgrading affected packages to version 1.6.59.

CVE-2026-57128 at a Glance

CVE Identifier CVE-2026-57128
GHSA Identifier GHSA-35w5-pcw4-jx94
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-306: Missing Authentication for Critical Function
Affected Product PraisonAI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

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

How to Fix CVE-2026-57128

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.

praisonaiagents fixed: 1.6.59
pip install praisonaiagents>=1.6.59
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 praisonaiagents

How to Check if You Are Affected

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

pip show praisonaiagents

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 1.6.59), your application is affected.

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-306: Missing Authentication for Critical Function, where the product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. 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 SSE (Server-Sent Events) server in `src/praisonai-agents/praisonaiagents/server/server.py` exposes a `/publish` endpoint that broadcasts arbitrary messages to all connected clients without any authentication. The `ServerConfig` dataclass (line 24) defines an `auth_token` field, but this token is never validated in the `/publish` or `/events` request handlers. Any attacker with access to the SSE server port can inject arbitrary events into the SSE stream visible to all connected clients, or use `/info` to leak server configuration including connected client count. ## Details **Vulnerable code (lines 164–180):** ```python async def publish(request): try: data = await request.json() event_type = data.get("type", "message") event_data = data.get("data", {}) self.broadcast(event_type, event_data) return JSONResponse({ "success": True, "clients": len(self._clients), }) ``` The `auth_token` field in `ServerConfig` (line 31): ```python @dataclass class ServerConfig: ... auth_token: Optional[str] = None ``` This `auth_token` is **never referenced** in any request handler. The `/publish` endpoint processes any POST request regardless of authentication headers. The `/info` endpoint (line 182) also has no auth and returns server configuration including `self.config.to_dict()`. **Routes registration (lines 190–194):** ```python routes = [ Route("/health", health, methods=["GET"]), Route("/events", events, methods=["GET"]), Route("/publish", publish, methods=["POST"]), Route("/info", info, methods=["GET"]), ] ``` No authentication middleware or token validation is applied to any route. ## PoC **Setup:** Start the SSE server (default port 8765). This is the documented server mode for streaming agent events. **Positive trigger — unauthenticated event injection:** ```bash # From any network-reachable host: curl -X POST http://localhost:8765/publish \ -H "Content-Type: application/json" \ -d '{"type": "message", "data": {"text": "INJECTED: arbitrary content sent to all clients"}}' ``` **Expected response:** ```json {"success": true, "clients": 3} ``` The response confirms the injection was broadcast to all connected SSE clients, and leaks the number of connected clients. **Positive trigger — info leak:** ```bash curl http://localhost:8765/info ``` **Expected response:** ```json { "name": "PraisonAI Agent Server", "version": "1.0.0", "clients": 3, "config": { "host": "127.0.0.1", "port": 8765, "auth_token": "***", ... } } ``` **Negative control — if auth were enforced:** A request without a valid `Authorization: Bearer <token>` header should return 401 Unauthorized. Currently, it returns 200 OK with no auth check. **Cleanup:** No persistent changes. ## Impact An attacker with access to the SSE server port (default 8765, bound to `127.0.0.1` by default per `DEFAULT_HOST` at line 21) can: - **Inject arbitrary events** into the SSE stream, potentially causing connected client applications to process malicious data, trigger actions, or display misleading content - **Leak server configuration** including number of connected clients and server settings via `/info` - **Use the response** to confirm connected client count, enabling reconnaissance While the default binds to localhost, deployments in containers or cloud environments commonly override the host to `0.0.0.0` to allow external access. When the host is overridden, this is exploitable from the network without authentication. ## Suggested remediation 1. **Validate `auth_token`** in the `/publish` and `/events` handlers: ```python async def publish(request): token = request.headers.get("Authorization", "").replace("Bearer ", "") if self.config.auth_token and token != self.config.auth_token: return JSONResponse({"error": "Unauthorized"}, status_code=401) # ... proceed with broadcast ``` 2. Apply the same token validation to `/events` (for reading) and `/info`. 3. The default binding to `127.0.0.1` is appropriate; maintain this default and warn when overridden to `0.0.0.0`. 4. Document the `auth_token` configuration option and recommend setting it in production.

CVE-2026-57128 Affected PraisonAI Versions

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

References

Frequently Asked Questions

What is CVE-2026-57128?
CVE-2026-57128 is a security vulnerability in PraisonAI involving Unauthenticated Event Injection via SSE `/publish` Endpoint under CWE-306: Missing Authentication for Critical Function.
Which PraisonAI versions are affected?
Affected versions include releases prior to 1.6.59 across affected packages: praisonaiagents.
What version fixes CVE-2026-57128?
Upgrading to 1.6.59 (or the latest patched release for your respective branch) resolves the vulnerability.
Is praisonaiagents affected?
Yes, praisonaiagents is affected in releases prior to 1.6.59. Upgrade your dependency to 1.6.59 or later.
What is the CVSS score of CVE-2026-57128?
CVE-2026-57128 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-57128?
CVE-2026-57128 is classified under CWE-306: Missing Authentication for Critical Function (The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.).
How can I check PyPI dependencies for CVE-2026-57128?
Run the dependency tree command: 'pip show praisonaiagents'. 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-35w5-pcw4-jx94",
  "modified" : "2026-07-20T21:25:52Z",
  "published" : "2026-06-18T13:52:13Z",
  "aliases" : [ "CVE-2026-57128" ],
  "summary" : "PraisonAI: Unauthenticated Event Injection via SSE `/publish` Endpoint",
  "details" : "## Summary\n\nThe SSE (Server-Sent Events) server in `src/praisonai-agents/praisonaiagents/server/server.py` exposes a `/publish` endpoint that broadcasts arbitrary messages to all connected clients without any authentication. The `ServerConfig` dataclass (line 24) defines an `auth_token` field, but this token is never validated in the `/publish` or `/events` request handlers. Any attacker with access to the SSE server port can inject arbitrary events into the SSE stream visible to all connected clients, or use `/info` to leak server configuration including connected client count.\n\n## Details\n\n**Vulnerable code (lines 164–180):**\n```python\nasync def publish(request):\n    try:\n        data = await request.json()\n        event_type = data.get(\"type\", \"message\")\n        event_data = data.get(\"data\", {})\n\n        self.broadcast(event_type, event_data)\n\n        return JSONResponse({\n            \"success\": True,\n            \"clients\": len(self._clients),\n        })\n```\n\nThe `auth_token` field in `ServerConfig` (line 31):\n```python\n@dataclass\nclass ServerConfig:\n    ...\n    auth_token: Optional[str] = None\n```\n\nThis `auth_token` is **never referenced** in any request handler. The `/publish` endpoint processes any POST request regardless of authentication headers. The `/info` endpoint (line 182) also has no auth and returns server configuration including `self.config.to_dict()`.\n\n**Routes registration (lines 190–194):**\n```python\nroutes = [\n    Route(\"/health\", health, methods=[\"GET\"]),\n    Route(\"/events\", events, methods=[\"GET\"]),\n    Route(\"/publish\", publish, methods=[\"POST\"]),\n    Route(\"/info\", info, methods=[\"GET\"]),\n]\n```\n\nNo authentication middleware or token validation is applied to any route.\n\n## PoC\n\n**Setup:** Start the SSE server (default port 8765). This is the documented server mode for streaming agent events.\n\n**Positive trigger — unauthenticated event injection:**\n```bash\n# From any network-reachable host:\ncurl -X POST http://localhost:8765/publish \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"type\": \"message\", \"data\": {\"text\": \"INJECTED: arbitrary content sent to all clients\"}}'\n```\n\n**Expected response:**\n```json\n{\"success\": true, \"clients\": 3}\n```\n\nThe response confirms the injection was broadcast to all connected SSE clients, and leaks the number of connected clients.\n\n**Positive trigger — info leak:**\n```bash\ncurl http://localhost:8765/info\n```\n\n**Expected response:**\n```json\n{\n  \"name\": \"PraisonAI Agent Server\",\n  \"version\": \"1.0.0\",\n  \"clients\": 3,\n  \"config\": {\n    \"host\": \"127.0.0.1\",\n    \"port\": 8765,\n    \"auth_token\": \"***\",\n    ...\n  }\n}\n```\n\n**Negative control — if auth were enforced:**\nA request without a valid `Authorization: Bearer <token>` header should return 401 Unauthorized. Currently, it returns 200 OK with no auth check.\n\n**Cleanup:** No persistent changes.\n\n## Impact\n\nAn attacker with access to the SSE server port (default 8765, bound to `127.0.0.1` by default per `DEFAULT_HOST` at line 21) can:\n\n- **Inject arbitrary events** into the SSE stream, potentially causing connected client applications to process malicious data, trigger actions, or display misleading content\n- **Leak server configuration** including number of connected clients and server settings via `/info`\n- **Use the response** to confirm connected client count, enabling reconnaissance\n\nWhile the default binds to localhost, deployments in containers or cloud environments commonly override the host to `0.0.0.0` to allow external access. When the host is overridden, this is exploitable from the network without authentication.\n\n## Suggested remediation\n\n1. **Validate `auth_token`** in the `/publish` and `/events` handlers:\n```python\nasync def publish(request):\n    token = request.headers.get(\"Authorization\", \"\").replace(\"Bearer \", \"\")\n    if self.config.auth_token and token != self.config.auth_token:\n        return JSONResponse({\"error\": \"Unauthorized\"}, status_code=401)\n    # ... proceed with broadcast\n```\n\n2. Apply the same token validation to `/events` (for reading) and `/info`.\n\n3. The default binding to `127.0.0.1` is appropriate; maintain this default and warn when overridden to `0.0.0.0`.\n\n4. Document the `auth_token` configuration option and recommend setting it in production.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "praisonaiagents"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.59"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.6.48"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-35w5-pcw4-jx94"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MervinPraison/PraisonAI"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-306" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-18T13:52:13Z",
    "nvd_published_at" : null
  }
}