/

CVE-2026-121864

Severity:

HIGH RISK

(8.5)

External Control of Executable Path (CWE-73) in nanobot

CVE-2026-121864

Deferred

Vulnerability type

Category:

External Control of Executable Selection

CWE:

CWE-73

Impact:

Execution of attacker-controlled code outside the sandbox

Severity:

HIGH RISK

(8.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/HKUDS/nanobot/releases/tag/v0.4.1
github.comgithub.com/HKUDS/nanobot/security/advisories/GHSA-5v87-m222-qr94
tenable.comtenable.com/security/research/tra-2026-68

Frequently asked

questions

The description does not establish a direct network attack path. Exploitation depends on whether an attacker can influence the agent's shell selection and workspace contents.

An attacker must be able to influence the selected shell and induce the agent to create an executable in its workspace. The executable then runs with the nanobot process's operating-system permissions.

Avoid caller-controlled executable selection. Use a trusted, policy-approved executable and ensure containment is active before any process starts.

Restrict executable paths, treat writable workspace contents as untrusted, apply least privilege, and review process-launch ordering against sandbox setup.

Find out what's already
exploitable in your codebase.