/

CVE-2026-85661

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-22) in excel-mcp-server File Tools

CVE-2026-85661

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and Write

Severity:

CRITICAL RISK

(9.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 excel-mcp-server allows unchecked file paths when the EXCEL_FILES_PATH setting is unset. An attacker who can invoke the affected read or write tools may access, modify, or create arbitrary files permitted by the server process.

Affected context

The issue occurs in excel-mcp-server when it runs in stdio mode without EXCEL_FILES_PATH configured. In that condition, file-management tools may accept paths without enforcing confinement to an intended Excel-file directory. The practical risk depends on which files the server process can access and whether an attacker can submit tool requests.

Exploit preconditions

  • Attack surface: File read and write tools exposed through the stdio interface
  • Required access: Ability to interact with the MCP server or cause it to process tool requests
  • Trigger point: Supplying a file path to an affected read or write operation while EXCEL_FILES_PATH is unset
  • Why exploitation is possible: The server does not reliably constrain user-supplied paths to an approved directory, allowing traversal outside the expected file scope

Why this happens

The underlying bug is a failure to enforce canonical path confinement before performing filesystem operations. User-controlled paths are treated as trusted file locations when the configured base directory is absent, rather than being resolved and checked against an explicit allowed root. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • An attacker may read sensitive files accessible to the server process.
  • An attacker could overwrite or create files in permitted filesystem locations.
  • Application configuration, credentials, or source code may be exposed or altered.
  • Malicious file changes could disrupt service operation or affect downstream workflows.
  • The server process or connected systems may be impacted depending on its privileges.

General mitigation guidance

Mitigation generally focuses on making filesystem boundaries explicit and enforcing them for every operation.

Common defensive patterns include:

  • Require an explicitly configured allowlisted root directory before enabling file tools.
  • Canonicalize and validate requested paths, then confirm they remain beneath the approved root.
  • Reject absolute paths, traversal components, symbolic-link escapes, and ambiguous path encodings where appropriate.
  • Use secure-by-default behavior that denies file access when confinement cannot be established.
  • Run the server under a dedicated low-privilege account with access limited to necessary files.
  • Separate read and write permissions when the application does not require both.
  • Avoid relying solely on client-side validation or configuration conventions.

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis rules identifying filesystem APIs that consume request-derived paths without canonicalization and boundary checks.
  • Code review checks for missing handling of unset base-directory configuration.
  • Tests covering absolute paths, parent-directory traversal, symbolic links, alternate path formats, and missing configuration.
  • Runtime policy monitoring for file access outside approved application directories.
  • Least-privilege filesystem policies and audit logging for unexpected reads, writes, and file creation.

Automated security review tools may help identify path construction and validation gaps, but findings should be confirmed against deployment-specific filesystem permissions.

Sources

SourceLink
github.comgithub.com/haris-musa/excel-mcp-server
github.comgithub.com/haris-musa/excel-mcp-server/blob/v0.1.8/src/excel_mcp/server.py
github.comgithub.com/haris-musa/excel-mcp-server/blob/v0.1.8/src/excel_mcp/validation.py
github.comgithub.com/haris-musa/excel-mcp-server/issues/149
vulncheck.comvulncheck.com/advisories/excel-mcp-server-0.1.8-arbitrary-file-read-write-via-stdio-mode

Frequently asked

questions

Exploitability depends on how the stdio MCP server is exposed and who can submit tool requests. A reachable integration or local service account with access to the server may be sufficient; network exposure is not inherently required.

The attacker needs the ability to invoke affected read or write tools and must target a deployment where EXCEL_FILES_PATH is unset or otherwise fails to establish a valid confinement boundary.

Require an explicit allowed root, canonicalize every requested path, and reject any result that falls outside that root. File access should fail closed when the boundary is missing or invalid.

Combine secure path-resolution helpers, negative and positive filesystem tests, least-privilege process accounts, configuration policies, and runtime auditing for out-of-scope file access.

Find out what's already
exploitable in your codebase.