TL;DR: GitHub advisory GHSA-jrrm-9hc7-2v3h (CVE-2026-62674, critical, published 2026-09-02) describes Omnigent versions before 0.3.0, where a normal authenticated user could overwrite a shared template agent and plant a stdio MCP server that later runner sessions would start as a subprocess. The interesting part is not the RCE. It is that the product already knew the shared agent must not be MCP-editable: the dedicated edit endpoint refused it, the API reported mcp_servers_editable as false, and the sibling full-bundle upload route simply never asked the question. The lesson for anyone building agent platforms is guard parity: a protection on one write path protects nothing if another path writes the same record. Below: what the advisory says, a runnable toy model, a route-parity test that fails before the fix and passes after, and a checklist.
Everything in this section comes from the public advisory text on GitHub (https://github.com/advisories/GHSA-jrrm-9hc7-2v3h). The affected package is omnigent on pip, vulnerable range < 0.3.0, first patched version 0.3.0, classified CWE-94 (improper control of generation of code).
The setup has three pieces:
agent.session_id is None. Many users create sessions from the same template. mcp_servers_editable as false for these agents, so the UI treats them as locked.PUT /sessions/{session_id}/agent accepts a full agent bundle. It checks that the caller has edit permission on The attacker needs only a normal account with edit access to one of their own sessions. They upload a bundle whose MCP configuration contains a stdio server. A stdio MCP server is, by design, a command the runner launches as a local subprocess. The next session created from the poisoned template starts that command with the permissions of the runner process. The advisory lists the consequences you would expect: reading runner-accessible files and credentials, modifying workspace data, pivoting to internal services reachable from the runner, or opening a remote shell if outbound networking is allowed. The suggested fix in the advisory is one line of intent: add the same session_id is None guard to the upload route.
Notice what is not broken here. Authentication worked. The session permission check worked. The direct edit route worked. Each individual control did its job. The failure is in the relationship between routes.
A guard is attached to a handler, but the rule it enforces is about a record. "Shared agents are not MCP-editable" is a property of the agent row, and every code path that can change MCP configuration on that row is subject to it. Two things make this hard to keep true over time:
The permission question and the record question are different questions. The first asks who is calling. The second asks what is being touched. Authorization frameworks that only answer the first leave the second to hand-written checks scattered across handlers.
There is also a simple probability argument. If each write route carries the guard with probability p independently, the chance that all n routes carry it is p^n. The chart at the top uses that formula. At p = 0.99 a platform with 12 write routes has all of them guarded only 88.6% of the time. At p = 0.95 it drops to 54.0%. The numbers are an illustration of compounding, not a measurement of any real codebase, but the direction is reliable: the more ways a record can be written, the less you can rely on remembering the rule each time.
The following toy model is not Omnigent code. It reproduces the shape of the bug: a shared agent, a guarded edit route, and a sibling upload route that checks only session permission.
class Agent:
def __init__(self, aid, session_id=None, mcp=None):
self.id, self.session_id, self.mcp = aid, session_id, list(mcp or [])
@property
def shared(self):
return self.session_id is None
class Store:
def __init__(self):
self.agents = {"tmpl": Agent("tmpl"), "mine": Agent("mine", session_id="s1")}
def update(self, agent, mcp):
agent.mcp = list(mcp)
def can_edit(user, session):
return session in user["sessions"]
def route_mcp_edit(st, user, session, agent, mcp):
if not can_edit(user, session): raise PermissionError("edit")
if agent.shared: raise PermissionError("read-only") # the guard
st.update(agent, mcp)
def route_bundle_upload(st, user, session, agent, mcp):
if not can_edit(user, session): raise PermissionError("edit")
st.update(agent, mcp) # no record-level guard
An attack helper calls a route with the attacker's own session s1 but targets the shared tmpl agent, then checks whether the template now contains stdio:attacker-cmd. A legitimacy helper checks that the user can still edit their own agent. Running the model produces this output:
route | shared agent poisoned | own agent still editable
mcp_edit (guarded) | False | True
bundle_upload (no guard) | True | True
bundle_upload (guard added) | False | True
parity violations: ['bundle_upload (no guard)']
after fix: []
Three observations. The guarded route blocks the attack and still lets users edit their own agents. The unguarded route lets the attack through while looking perfectly normal to a functional test, because the legitimate case also passes. And adding the guard fixes the attack without breaking legitimate use, which is why this class of fix is cheap once someone spots it. The hard part is spotting it, because every existing test is green.
Functional tests ask "does the feature work." A parity test asks "does every path that can write this field enforce the same rule." In the toy model it is a loop over a registry of write routes:
def attack(route):
st = Store(); user = {"sessions": {"s1"}}
try:
route(st, user, "s1", st.agents["tmpl"], ["stdio:attacker-cmd"])
except PermissionError:
pass
return "stdio:attacker-cmd" in st.agents["tmpl"].mcp
def parity(routes):
return [name for name, route in routes.items() if attack(route)]
assert parity(WRITE_ROUTES) == [], "routes that mutate shared agents"
The test has two properties worth copying into a real suite:
WRITE_ROUTES by introspecting the router: every route whose handler reaches the store's update, create, or replace functions. If a new route appears and is not in the registry, a second test fails the build ("unregistered writer"). That is what turns the guard from a habit into a property.
To check that the test has teeth, do a mutation run: remove the guard from route_mcp_edit and confirm parity reports it. If your suite stays green with a guard deleted, the suite is not testing the rule.
The most durable fix moves the check from the handler to the layer that owns the record. Three options, from weakest to strongest:
if statements, still depends on each author calling it. Add the parity test above or this regresses.update refuses to change MCP configuration on a shared agent unless the caller passes an explicit capability, such as as_template_admin=True. A new route that forgets the check now fails loudly in testing instead of silently succeeding.
For the specific data in this advisory, there is also a second line of defense that does not depend on route logic: treat any stdio MCP entry as executable code and gate its launch. A runner that starts a subprocess from stored configuration should compare the command against an allowlist maintained outside the user-writable agent record, or require that the record was signed by an admin flow. Then even a successful write to a template cannot become command execution on its own. This is the same principle as checking at the sink, not just at the entry: validation at the place where the dangerous action happens does not care which route wrote the data.
If you run or build an agent platform, these are the places where "one rule, many writers" tends to hide:
For each, ask the same two questions. Which fields are executable, meaning they eventually become a command, a URL fetched with credentials, or a tool grant? And how many code paths can write them? If the second number is larger than the number of tests that attack each path, you have the same gap this advisory describes.
Is this the same as an authorization bypass?
Close, but narrower. Authentication and session authorization worked as written. The missing piece was an object-level rule (shared agents are read-only) that existed on one route and not another. Security folks often file this under broken object-level authorization or inconsistent enforcement.
Does it matter that the attacker must be authenticated?
Yes for severity scoring, less for risk. In shared or company-hosted deployments, any employee or tenant with their own session meets the precondition, and the payload runs on infrastructure used by other people's sessions.
Which version fixes it?
According to the advisory, omnigent 0.3.0 is the first patched version for the pip package, and the vulnerable range is everything below it. Check the advisory page for the current state before relying on this.
Why not just block stdio MCP servers entirely?
Many legitimate tools are local processes. A blanket ban breaks real workflows. Gating launch with an allowlist or signed configuration keeps them while removing the ability of a stray write to become execution.
How do I find unguarded siblings quickly?
Grep for every call to the persistence function that your guarded route uses. Each caller either has the same guard, calls a shared helper that does, or is a finding. Then encode that list as the registry in your parity test.
Is the probability chart a real measurement?
No. It is the arithmetic of p^n under an independence assumption, included to show how risk compounds with the number of write paths. Real guard rates are not independent and are unknown for any given codebase.
See the earlier posts in the Agent Safety Engineering series on this profile.
Sources: GitHub Advisory Database entry GHSA-jrrm-9hc7-2v3h (https://github.com/advisories/GHSA-jrrm-9hc7-2v3h), retrieved 2026-12-06.