GHSA-jrrm-9hc7-2v3h: Code Injection
Summary
An authenticated user with edit access to their own session can overwrite a shared/template agent by uploading a full agent bundle through PUT /sessions/{sessionid}/agent.
Shared/template agents are shown as not MCP-editable, but this upload path still accepts a replacement bundle. By adding a stdio MCP server to the shared agent, the attacker can cause future runner sessions using that shared agent to start an attacker-controlled command.
Details
The vulnerable endpoint is the full agent bundle upload route: PUT /sessions/{sessionid}/agent This route checks whether the caller can edit the session: LEVELEDIT session permission check But it does not check whether the bound agent is a shared/template agent. Shared/template agents have: python agent.sessionid is None The API already exposes that these agents are not meant to be MCP-editable: mcpserverseditable is false for shared/template agents The direct MCP edit endpoint correctly blocks shared/template agents: sessionmcpservers.py shared-agent guard python if agent.sessionid is None: raise OmnigentError("Built-in agents are read-only through this endpoint.") The full bundle upload endpoint is missing that same guard. It stores the uploaded bundle and updates the agent row: agentstore.update(agent.id, newloc) For shared/template agents, this changes the shared agent itself, not only the attacker's session. This becomes command execution because stdio MCP servers start the configured command as a runner subprocess: tools/mcp.py stdio subprocess launch
Suggested fix: add the same agent.sessionid is None guard to PUT /sessions/{sessionid}/agent.
Impact
This is authenticated RCE against Omnigent runner hosts. A normal authenticated user with edit access to their own session can poison a shared/template agent bundle, even though that agent is shown as not MCP-editable. The poisoned bundle can then be used by future sessions created from the same shared agent.
Because stdio MCP servers run as local subprocesses, the attacker-controlled command executes with the permissions of the Omnigent runner process. In a shared or company-hosted deployment, this can let an attacker read runner-accessible files and credentials, modify workspace data, disrupt runner availability, pivot to internal services reachable from the runner, or establish an interactive remote shell if outbound networking is allowed.
This is high impact because it turns normal shared-agent session access into command execution on runner infrastructure used by other sessions.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/omnigentto a version that resolves this vulnerability.Fixed in 0.3.0 - Configuration
In the full agent bundle upload endpoint `PUT /sessions/{session_id}/agent` (routes/sessions.py), add the same `agent.session_id is None` guard used elsewhere to block shared/template (built-in) agents from being replaced. The rejected condition should raise `OmnigentError("Built-in agents are read-only through this endpoint.")`.
Omnigent API (PUT /sessions/{session_id}/agent) agent.session_id guard (agent.session_id is None check) = Add guard: if agent.session_id is None then reject the request with OmnigentError("Built-in agents are read-only through this endpoint.")
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated user who has edit permission for their own session can exploit it. The vulnerable route enforces session edit permission but does not verify that the bound agent is not a shared/template agent.
Does the non-editable MCP indication prevent exploitation?
No. Shared/template agents are exposed as not MCP-editable, but the full agent-bundle upload endpoint still accepts a replacement bundle for the agent.
What does an attacker need to upload to achieve command execution?
The attacker can upload a full replacement agent bundle that adds a stdio MCP server. Future runner sessions that use the altered shared agent can then start an attacker-controlled command.
Which endpoint should be reviewed for exposure or suspicious use?
Review use of PUT /sessions/{session_id}/agent, particularly uploads performed by users with session edit access where the session is bound to a shared/template agent.