Summary
When sandboxed execution is enabled, nanobot may allow a caller to choose the shell executable, which is launched before the sandbox is applied. If an attacker can influence that choice and cause the agent to create an executable in its workspace, the executable may run outside the sandbox with the nanobot process's operating-system permissions.
Affected context
The issue affects nanobot's sandboxed command-execution flow when the shell executable is caller-selectable. Risk arises if an attacker can influence the selected shell and cause an executable to be present in the workspace. Because the executable is launched before sandbox protections take effect, those protections may not constrain its initial execution.
Exploit preconditions
- Attack surface: The agent's command-execution or shell-selection interface
- Required access: Ability to influence the shell selection and induce the agent to create an executable in its workspace
- Trigger point: The command launch that starts the selected shell while sandboxed execution is enabled
- Why exploitation is possible: The selected executable runs before the sandbox is applied, so it can operate with the nanobot process's permissions outside the intended sandbox
Why this happens
The execution flow trusts a caller-controlled executable selection and starts that executable before applying the sandbox boundary. This is an external control of a file or path, mapping to CWE-73: External Control of File Name or Path. More broadly, the pattern lets untrusted input determine which executable is launched in a privileged or insufficiently constrained context.
Potential impact
- Attacker-controlled code could run outside the intended sandbox
- The executable could access resources available to the nanobot process
- Data accessible to the process could be read, changed, or removed
- The host or surrounding environment could be affected, depending on process permissions and deployment controls
General mitigation guidance
Defensive patterns include:
- Use a fixed, trusted shell or an allowlist of executable paths rather than accepting arbitrary caller-selected executables
- Apply sandboxing and other containment controls before launching any potentially untrusted process
- Reduce trust in workspace contents and prevent untrusted parties from creating or replacing executables there
- Run the agent with least-privilege operating-system permissions and limit access to sensitive resources
- Treat executable selection as security-sensitive configuration and validate it against a strict policy
How teams detect issues like this
Review command-launch paths for caller-controlled executable names or paths, especially where process creation occurs before sandbox setup. Static analysis and code review can flag dynamic executable selection, workspace-based executable resolution, and launch operations that precede containment. Runtime policies can restrict allowed executables and monitor process launches from writable workspaces; automated review tools may help identify these patterns.

