Summary
Omnigent versions before 0.3.0 allow an authenticated user's agent bundle to specify an arbitrary dotted Python callable path for a tool. When the runner imports and invokes that callable, the bundle may select a command-execution function and run local commands with the runner process's permissions.
Affected context
The vulnerability occurs in Omnigent deployments that accept multipart agent bundles through the session API and execute declared tools through the runner. It becomes risky when an authenticated user can submit a bundle whose tool specification is not restricted to an approved set of callable functions.
Exploit preconditions
- Attack surface: Authenticated multipart POST requests to the session creation endpoint
- Required access: A valid user account permitted to submit an agent bundle; administrator access is not required
- Trigger point: Tool resolution and invocation during agent execution
- Why exploitation is possible: Bundle validation permits an attacker-controlled dotted Python path, which the runner imports and calls with its own process privileges
Why this happens
The underlying bug is insufficient validation of a user-controlled callable reference. The bundle validator accepts a tools.callable dotted Python path, while the dispatch logic dynamically imports and invokes the referenced function without enforcing an allowlist or safe execution boundary. This maps to CWE-94: Improper Control of Generation of Code, because data supplied through an agent bundle is treated as executable behavior.
Potential impact
- Execution of arbitrary local commands in the runner process
- Exposure of environment variables, credentials, and runner files
- Access to workspace data and potentially reachable internal services
- Modification or destruction of agent-generated data
- Service degradation or denial of availability
- Further compromise of systems accessible from the runner
General mitigation guidance
Mitigation generally focuses on removing dynamic execution from untrusted bundle content and reducing the runner's trust and privilege boundaries.
Common defensive patterns include:
- Restricting tool references to a fixed, reviewed allowlist of registered functions
- Treating bundle fields as data rather than importable code
- Validating tool names and schemas before execution
- Running agent workloads in isolated sandboxes with minimal filesystem, network, and credential access
- Applying least-privilege identities and separating runner credentials from host or service credentials
- Preventing untrusted users from defining executable tool implementations
How teams detect issues like this
Organizations can look for this issue through:
- Static analysis rules targeting dynamic imports, reflection, and callable resolution from request data
- Code review checks for user-controlled module paths, function names, or other executable references
- Tests that submit unexpected tool identifiers and verify that validation rejects them
- Runtime monitoring of child-process creation, unusual outbound connections, and access to sensitive environment variables
- Policy enforcement requiring explicit tool registration and denying arbitrary imports in agent bundles
Automated security review tools may help identify dynamic execution patterns, but findings should be confirmed against the framework's trust boundaries.

