/

CVE-2026-121865

Severity:

HIGH RISK

(7.6)

Incorrect Authorization (CWE-863) in nanobot WebSocket

CVE-2026-121865

Deferred

Vulnerability type

Category:

Incorrect Authorization

CWE:

CWE-863

Impact:

Unauthorized file disclosure

Severity:

HIGH RISK

(7.6)

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

nanobot's WebSocket gateway may let a client with a valid client token choose an existing directory outside the operator-configured workspace for a new conversation. The agent may then read and expose files in that directory that are accessible to the nanobot service account.

Affected context

The issue occurs in nanobot's WebSocket gateway when a conversation's root directory is selected. It affects nanobot-ai versions from 0.3.5 to before 0.4.1 when a standard client with a valid token can select a directory outside the configured workspace. The agent's ability to access files is limited by the permissions of the nanobot service account.

Exploit preconditions

  • Attack surface: nanobot WebSocket gateway
  • Required access: A valid client token
  • Trigger point: Selecting an existing directory as the root of a new conversation
  • Why exploitation is possible: The directory selection may not be adequately restricted to the operator-configured workspace, allowing the agent to access files readable by its service account.

Why this happens

The underlying issue is an authorization failure mapped to CWE-863: Incorrect Authorization. The gateway permits a client to select a directory without sufficiently enforcing the configured workspace boundary. As a result, a valid token may grant access beyond the intended scope of the client's authorization.

Potential impact

  • The agent may read files outside the configured workspace.
  • Sensitive information readable by the nanobot service account could be exposed through the conversation.
  • The incident could affect the confidentiality of data accessible to the service account.

General mitigation guidance

Defensive patterns focus on enforcing authorization boundaries at the point where directories are selected and used.

  • Restrict conversation roots to the configured workspace by default.
  • Canonicalize and validate paths against the permitted workspace before granting access.
  • Treat client-selected paths as untrusted, even when the client has a valid token.
  • Run the service with least-privilege filesystem permissions so it can access only necessary files.
  • Apply consistent authorization checks wherever conversation roots or file access are handled.

How teams detect issues like this

  • Review gateway code for client-controlled directory paths and checks that do not enforce workspace boundaries.
  • Use static analysis or code review rules to identify filesystem access based on request data without authorization validation.
  • Test that clients cannot select directories outside the configured workspace, including through alternate or canonicalized path forms.
  • Monitor for conversation roots or file access outside expected workspace locations, and enforce workspace boundaries through application policy.

Sources

SourceLink
github.comgithub.com/HKUDS/nanobot/releases/tag/v0.4.1
github.comgithub.com/HKUDS/nanobot/security/advisories/GHSA-hg87-wf6q-3m38
tenable.comtenable.com/security/research/tra-2026-69

Frequently asked

questions

The described issue requires a valid client token; it does not describe access by an unauthenticated client.

A standard client must hold a valid token and be able to select a directory when starting a conversation. File exposure is limited to files readable by the nanobot service account.

Enforce the configured workspace boundary whenever a conversation root is selected or used, and validate the resolved directory before allowing access.

Treat client-supplied paths as untrusted, apply consistent authorization checks, test boundary cases, and minimize the service account's filesystem permissions.

Find out what's already
exploitable in your codebase.