/

CVE-2026-18991

Severity:

HIGH RISK

(7.3)

Path Traversal (CWE-22) in NanoClaw send_file Endpoint

CVE-2026-18991

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Access

Severity:

HIGH RISK

(7.3)

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

NanoClaw contains a path traversal vulnerability in the send_file functionality, allowing remote requests to influence file path handling. When attacker-controlled path input is accepted without adequate confinement, an attacker may access files outside the intended directory.

Affected context

The issue affects NanoClaw deployments using the send_file functionality in versions up to 2.0.64. Risk is present where the component processes remotely supplied file references without reliably restricting resolved paths to an approved directory or applying equivalent authorization controls.

Exploit preconditions

  • Attack surface: The remotely accessible send_file functionality
  • Required access: Access to invoke the relevant remote interface; authentication requirements depend on deployment configuration
  • Trigger point: File path processing performed when a file is requested or transmitted
  • Why exploitation is possible: Insufficient path confinement may allow a supplied path to resolve outside the intended file-access directory

Why this happens

The underlying bug is improper limitation of file paths derived from external input. If path components are accepted without canonicalization, containment checks, and authorization, filesystem operations may reach locations outside the intended directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Potential impact

  • An attacker may read files outside the intended application directory
  • Sensitive configuration, credentials, or source files could be exposed
  • The application may disclose information useful for follow-on attacks
  • In deployments permitting file writes through related functionality, unintended files could potentially be modified

General mitigation guidance

Mitigation generally focuses on reducing trust in externally supplied paths and enforcing a strict filesystem boundary.

Common defensive patterns include:

  • Resolve paths canonically and verify that they remain within an approved base directory
  • Prefer server-side file identifiers or allowlisted filenames over client-supplied paths
  • Reject traversal syntax, ambiguous encodings, and symlink-based escapes as defense-in-depth
  • Apply authorization checks before file access and expose only the minimum required files
  • Run the component with least-privilege filesystem permissions and isolate sensitive paths
  • Use read-only access where file transmission does not require modification

How teams detect issues like this

Organizations commonly detect path traversal risks through:

  • Static analysis for filesystem APIs receiving request parameters or other untrusted path data
  • Code review checks for missing canonicalization, containment validation, or authorization
  • Dynamic testing with normalized, encoded, and separator-variant path inputs in controlled environments
  • Runtime policy controls that alert on access outside approved directories
  • Automated security review tools and dependency monitoring that flag known vulnerable components

Sources

SourceLink
github.comgithub.com/nanocoai/nanoclaw/
github.comgithub.com/nanocoai/nanoclaw/issues/2760
vuldb.comvuldb.com/cve/CVE-2026-18991
vuldb.comvuldb.com/submit/862563
vuldb.comvuldb.com/vuln/386367
vuldb.comvuldb.com/vuln/386367/cti

Frequently asked

questions

The vulnerability is described as remotely exploitable when an attacker can reach and invoke the affected send_file functionality.

The available information does not establish a specific authentication requirement. The relevant prerequisite is access to the exposed interface, whether authenticated or unauthenticated.

Use server-controlled file identifiers or an allowlist, then canonicalize and verify every resolved path remains within an authorized directory before performing file access.

Combine strict input handling, filesystem sandboxing, least-privilege permissions, authorization checks, and automated tests for traversal variants in code review and CI pipelines.

Find out what's already
exploitable in your codebase.