Nanobot - Arbitrary Workspace Root Selection Exposes Host Files

High

Synopsis

In nanobot >= 0.3.5 < 0.4.1, a standard WebSocket client can replace the restricted root of a new conversation with any absolute directory that exists and is accessible to the service account. `restrictToWorkspace` still applies, but around the client-chosen root rather than the workspace configured by the operator.

Token audiences are meant to separate standard clients from owner WebUI connections: `issue_token` defaults to the `client` audience, and only `webui` connections join the owner set. However, `workspace_project_selection_available` returns `True` for every authenticated connection, and that value is passed as `can_change_project` when `new_chat` is dispatched. Any client token can therefore redefine the filesystem boundary, giving agent filesystem tools access to every file readable by the non-root `nanobot` account. This is not an authentication bypass or code execution.

The submitted scope reaches `validate_workspace_scope_payload`, which only checks that `project_path` is absolute and refers to an existing directory. It does not require the path to stay under the configured workspace, nor the connection to hold the `webui` audience. The accepted scope is attached to the conversation and used by `current_tool_workspace` and the filesystem tools as their new restricted root.

The bypass reproduces with `/srv/nanobot/workspace` as the configured workspace, `restrictToWorkspace=true`, and `sandbox=bwrap`. A file under `/srv/nanobot-canary` is hidden from an ordinary conversation. With a standard client token, sending `new_chat` with `project_path` set to `/srv/nanobot-canary` and `access_mode` set to `restricted` returns a `session_updated` event confirming that root, and `read_file` then returns the canary's exact contents.

The same root is used by `write_file` and `edit_file`, so locations writable by the service account are exposed to modification as well, though this was not runtime-validated.

Solution

Update to Nanobot version 0.4.1 or later.

Disclosure Timeline

September 28, 2026 : Reported through Github
October 05, 2026 : Tenable asking for update
October 05, 2026 : The vendor has confirmed receipt and is working on a fix.
October 05, 2026: The vendor has shared the fix and is requesting verification.
October 06, 2026: Tenable has confirmed the fix.
October 12, 2026 : Tenable asking for update
October 19, 2026 : Tenable asking for update
November 03, 2026: Tenable asking for update
November 04, 2026: The vendor requests to verify additional fixes.
November 04, 2026: Tenable has confirmed the fix.
November 04, 2026: The Vendor will communicate the actual merge commits as well as the planned publication date, once the latter has been confirmed.
November 04, 2026: The fix has been merged into main and is awaiting a release.
November 06, 2026: The fix is released in version 0.4.1

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]