/

CVE-2026-86439

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Knowns MCP File Access Tools

CVE-2026-86439

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary file access and filesystem modification

Severity:

HIGH RISK

(8.8)

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

A path traversal vulnerability in Knowns MCP tool arguments allows attackers to use crafted filesystem paths to escape the intended project directory. Depending on the server process permissions, this may expose, create, overwrite, or delete Markdown files outside the project workspace.

Affected context

The vulnerability affects Knowns deployments that process MCP tool arguments containing filesystem paths without adequately validating that the resolved paths remain within the permitted project directory. It becomes risky when an attacker can invoke the relevant MCP tools and the server process has access to files beyond the intended workspace.

Exploit preconditions

  • Attack surface: MCP tools that accept filesystem path arguments
  • Required access: Ability to invoke the affected tools through an exposed or trusted MCP interface
  • Trigger point: Processing a path argument containing directory traversal sequences
  • Why exploitation is possible: The application does not reliably canonicalize and constrain requested paths to the authorized project directory before performing filesystem operations

Why this happens

The underlying bug is insufficient filesystem path validation. User-controlled path arguments are accepted without consistently resolving them to canonical paths and verifying that the result remains within an approved directory boundary.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal. The insecure pattern occurs when relative path components or equivalent path representations are trusted during file reads, creation, replacement, or deletion.

Potential impact

  • Attackers may read Markdown files outside the intended project directory
  • Attackers could create or overwrite files accessible to the server process
  • Attackers may delete project or adjacent files
  • Sensitive documentation or operational content could be disclosed
  • File integrity and application behavior could be disrupted

General mitigation guidance

Mitigation generally focuses on treating tool-supplied paths as untrusted and enforcing a strict filesystem boundary.

Common defensive patterns include:

  • Resolve paths canonically before authorization checks
  • Require the resolved path to remain beneath an explicitly permitted project root
  • Reject traversal components, ambiguous path forms, and unexpected path schemes
  • Use secure-by-default APIs that operate only within an approved directory
  • Apply separate allowlists for readable, writable, and deletable paths
  • Run the server process with the least filesystem privileges necessary
  • Prevent access to sensitive directories through operating-system permissions and sandboxing

How teams detect issues like this

Organizations can detect path traversal risks through:

  • Static analysis rules for filesystem APIs receiving user-controlled path arguments
  • Code review checks requiring canonicalization before authorization
  • Tests covering relative traversal, absolute paths, symlink resolution, and alternate path representations
  • Runtime monitoring for file operations outside approved project roots
  • Policy enforcement that restricts MCP tool arguments to declared workspace boundaries
  • Automated security review tools that flag missing path containment checks

Sources

SourceLink
github.comgithub.com/knowns-dev/knowns/blob/v0.29.1/internal/storage/doc_store.go#L124-L129
github.comgithub.com/knowns-dev/knowns/blob/v0.29.1/internal/storage/memory_store.go#L203-L211
github.comgithub.com/knowns-dev/knowns/commit/09c5a96fd5817b941dc86669278c1a17db10ed4e
github.comgithub.com/knowns-dev/knowns/releases/tag/v0.30.0
github.comgithub.com/knowns-dev/knowns/security/advisories/GHSA-9gfj-28hw-jchp
vulncheck.comvulncheck.com/advisories/knowns-before-0.30.0-path-traversal-via-mcp-doc-and-memory-tools

Frequently asked

questions

It can be exploitable through a remote or network-accessible MCP interface when an attacker is permitted to invoke the affected tools. The exact exposure depends on how the MCP server is deployed and authenticated.

The attacker generally needs access to an MCP client or interface that can submit path arguments to the vulnerable tools. The server process must also have permission to access the targeted files.

Treat every tool-provided path as untrusted, canonicalize it, and allow the operation only when the resolved path remains within an explicitly authorized directory.

Combine strict path-containment checks with least-privilege service accounts, filesystem sandboxing, operation-specific allowlists, and tests for traversal and symlink-based escapes.

Find out what's already
exploitable in your codebase.