Where
-Infinity
0
Severity
7.7
Path Traversal
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Omnigent 0.3.0 before 0.14.0 contains a path traversal vulnerability that allows authenticated users to escape the workspace by setting osenv.cwd on nested sub-agents. Attackers can upload a bundle whose sub-agent uses an absolute or parent-traversing working directory, bypassing root-only validation in bundles.py, to read and write host files as the runner user.

First published (updated )
Severity
8.8
Code Injection
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Summary

An authenticated user can upload a crafted agent bundle that defines a server-side Python callable tool. The server validates the uploaded bundle, but it does not block dangerous callable: paths in untrusted user-provided agent configs.

When the tool is invoked, the runner imports and executes that Python callable. A crafted bundle can point the tool at subprocess.checkoutput, which lets the attacker run a local command on the runner machine.

This is serious because hosted Omnigent deployments can have multiple users and shared or managed runner hosts. A normal logged-in user should not be able to make the runner execute arbitrary local commands.

Details

The uploaded bundle path is reachable through session creation. Omnigent supports custom agent bundles through multipart POST /v1/sessions; the Web UI uses this same endpoint for custom agents:

Create custom agent builds and uploads a bundle \ createBundledSession posts the bundle to /v1/sessions

A crafted bundle can also be submitted directly through the API/CLI when creating a session from agent YAML. The PoC below uses this direct bundle shape so the vulnerable trust boundary is easy to reproduce.

On the server, uploaded bundles are validated here: validateagentbundle

The validator already treats uploaded bundles as untrusted in some ways. For example, it disables server-side environment expansion and can enforce a policy-handler allowlist: python spec = load( bundlebytes, dest=Path(tmpdir) / "agent", expandenv=False, enforcehandlerallowlist=enforcehandlerallowlist, ) However, the same validation does not reject tools.<name>.callable entries in an uploaded agent bundle. Python callable tools are an intended trusted/operator feature, but the upload path accepts them from tenant-provided bundles too.

The docs describe server-side Python callable tools here: Python function tool docs \ Later, the runner resolves and executes those callables: resolvespeccallable imports the dotted path python mod = importlib.importmodule(modulename) fn = getattr(mod, attrname, None) executespeccallabletool calls the resolved function python result = await asyncio.tothread(resolved, args) The high-level tool dispatcher falls back to this callable execution path: executetool callable fallback python output = await executespeccallabletool(toolname, args, agentspec=agentspec)

The problem is the trust boundary. Python callables are a trusted local developer feature, but uploaded agent bundles can be user-controlled in a hosted/multi-user server. The upload validator blocks some trusted-only policy behavior, but it does not block trusted-only tool callables.

Suggested fix: when validating HTTP-uploaded bundles on a shared/multi-user server, reject server-side Python callable tools unless they are explicitly allowlisted by the operator. A conservative fix would reject callable: tool paths for tenant-uploaded bundles, while keeping trusted local/operator-authored configs working.

Impact

This is authenticated RCE against the Omnigent runner environment. A normal authenticated user who can upload or create a custom agent bundle can declare a server-side Python callable and have the runner import and execute it.

Because the callable runs inside the runner process, the attacker-controlled code runs with the runner's permissions. In a hosted or multi-user deployment, this can expose runner-accessible files, environment variables, credentials, workspace data, internal services reachable from the runner, and runner availability.

This is high impact because it crosses the boundary from "upload an agent config" to "execute local code on shared runner infrastructure" without requiring admin/operator access.

1 / 2
Source: GitHub
First published (updated )
Severity
8.8
Path Traversal
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Summary

An authenticated, non-admin user can obtain arbitrary host-filesystem read/write (and host environment-secret disclosure) on an Omnigent runner by uploading an agent bundle whose osenv.cwd points outside any intended workspace (e.g. / or /home/<victim>). The cwd field is taken verbatim from the bundle with no validation, normalization, or boundary check anywhere in the spec pipeline.

This is a different sink from GHSA-jrrm-9hc7-2v3h (CWE-94, shared-agent bundle overwrite -> stdio MCP RCE). It shares the bundle-upload vector but is reached through the user's own session-scoped agent and is not addressed by that advisory's proposed shared-agent guard.

Preconditions

- Runner realizes a session-scoped uploaded bundle without OMNIGENTRUNNERWORKSPACE set. When that env var is set (CLI- and host-launched sessions set it), the spec cwd is overridden and the attack is neutralized — so this is deployment-gated, not universal. - Attacker is any authenticated user (no admin scope; requireuser only checks identity). No shared-agent overwrite needed.

Details (verified against code)

1. Parse — no validation. omnigent/spec/parser.py:696 stores cwd=str(cwdraw) verbatim. Absolute paths (/, /etc), ../.., etc. are all accepted. The sandbox.type is likewise author-chosen and "none" is legal. 2. Validate — cwd unconstrained. omnigent/spec/validator.py validateosenv checks only fork/scratch/egress combinations; it never references cwd (the sole mention, line ~526, is a comment). No boundary is applied to the cwd itself. The boundary in server/schemas.py validates a caller-supplied workspace against the spec cwd (treating the author cwd as trusted) and only for host-launched sessions — it does not bound the cwd. 3. Sink. omnigent/inner/osenv.py:890 sets cwd = Path(spec.cwd or os.getcwd()).resolve(strict=False) as the environment root; osenv.py:934 does shutil.copytree(src=cwd, ...) when fork=true. All agent file/shell tools are bounded by assertwithincwd (osenv.py:1040), which checks resolved.relativeto(cwd) — but since cwd is attacker-controlled, cwd=/ makes the entire host filesystem in-bounds for read and write; fork=true with cwd=/home/victim copies that tree into the agent-readable workspace. 4. Decisive gate. omnigent/runner/resourceregistry.py:648-654: cwd = defaultcwd only when self.runnerworkspace is not None or specosenv.cwd in (None, ".", "./"); otherwise cwd = specosenv.cwd (the attacker's absolute path). So OMNIGENTRUNNERWORKSPACE is the only thing standing between the spec and the host FS — and it is an operational control, not an in-code guard. A code comment at tooldispatch.py:~4207 claims cwd "is treated as a boundary at session-create time," which is not true on this path.

Attack path

1. Authenticated user sends POST /v1/sessions (multipart) with an agent bundle whose config.yaml contains: yaml osenv: cwd: "/" # or /home/<victim>, with fork: true for one-shot exfil sandbox: { type: none } 2. On a runner without OMNIGENTRUNNERWORKSPACE, the agent's sysosread/write/edit/shell tools now operate over the whole host filesystem, and (sandbox inactive) inherit the runner's full environment — exposing host secrets via e.g. sysosshell("env").

Impact

Arbitrary host-filesystem read/write and runner-environment secret disclosure, available to any authenticated user on an affected deployment. High severity (deployment-conditional).

Suggested fix

Add a control on the cwd field itself in omnigent/spec/validateosenv (and/or at parse): reject absolute paths and .. traversal, and require cwd to resolve within the runner workspace / an allow-listed root. Do not rely on OMNIGENTRUNNERWORKSPACE being set as the sole defense. Consider also disallowing bundle-author sandbox.type: none for server-realized (non-CLI) sessions.

Related

GHSA-jrrm-9hc7-2v3h (same bundle-upload vector, different sink; that fix does not cover this).

1 / 2
Source: GitHub
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203