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.
Additional References
https://github.com/HKUDS/nanobothttps://github.com/HKUDS/nanobot/security/advisories/GHSA-hg87-wf6q-3m38
Disclosure Timeline
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]
Tenable One
Request a demo
The world’s leading AI-powered exposure management platform.
Thank You
Thank you for your interest in Tenable One.
A representative will be in touch soon.
Form ID: 7469
Form Name: one-eval
Form Class: c-form form-panel__global-form c-form--mkto js-mkto-no-css js-form-hanging-label c-form--hide-comments
Form Wrapper ID: one-eval-form-wrapper
Confirmation Class: one-eval-confirmform-modal
Simulate Success