HOL LogoGuard

Explore HOL

  • HOL home
  • AI agent registry
  • AI plugins
  • Open standards
  • HOL members
  • Sponsor HOL
  • Advertise with HOL

Guard product

  • Guard overviewLocal security and control for AI agents and the tools they use.
  • FeaturesRuntime protection, policy routing, review, and evidence.

Explore Guard

  • Product previewWalk through Guard surfaces in read-only demo mode.
  • ComparisonCompare Guard with native controls and AI security vendors.

AI tools

  • All AI toolsEvery supported AI tool and how Guard applies policy to it.
  • Codex
  • Claude Code
  • Cursor
  • Antigravity CLI
  • OpenCode
  • Hermes
  • OpenClaw
  • GitHub Copilot CLI
  • Antigravity
  • Kimi
  • Grok
  • Pi / Oh My Pi
  • Zcode

Extensions

  • All extensionsBrowse command and MCP coverage with owners and stated limits.
  • Command coverageShell command protection across clouds, databases, backups, and packages.
  • MCP server coverageSee how Guard maps risk state across MCP tools and servers.
  • Core safetyThe safety floor listings that ship with Guard.
  • Data and resilienceBackup and storage command protection.
  • Cloud and infrastructureAWS, Azure, GCP, Kubernetes, and more.

Security

  • AI security hubSecurity research, advisories, and agent safety coverage.
  • AI tool securitySecurity profiles for each supported coding agent.
  • Safe labsHands-on attack simulations with safe boundaries.
  • Redacted warningsReal blocked actions with sensitive details removed.
  • AdvisoriesCoordinated disclosure reports for AI tooling.
  • Active CVEsSearch active CVEs affecting AI tooling.

Learn

  • Security guidesPractical guides for securing AI agent workflows.
  • DocsInstall, configure, and operate Guard with confidence.
  • ResearchPublished security research, benchmarks, and methodology.

Community

  • ReleasesVersion history, shipped changes and upgrade notes.
  • ContributorsThe people and contributions behind HOL Guard.
  • AffiliatesShare Guard with your audience and earn from referrals.
  • SponsorFund agreed research, implementation and shared testing through the HOL Partner Program.
  • AdvertiseCompare README logo placements, previews and monthly prices, or promote a plugin or extension.
PricingEnterpriseOpen AppInstall Guard
  1. Guard
  2. Security
  3. CVEs
  4. CVE 2026 40576 excel mcp server has a path traversal issue
HOL Guard

Public security guidance for teams protecting AI harnesses, MCP servers, skills, prompts, and local tool execution.

Install Guard

AI Security

  • Prompt injection
  • MCP security
  • OWASP MCP mapping
  • Supply chain

Resources

  • Trust packet
  • Harness setup
  • Redacted warnings
  • Safe labs

Product

  • Install Guard
  • Pricing
  • Open dashboard
Guard
  • Guard Overview
  • Releases
  • Contributors
  • Install Guard
  • Pricing
Docs
  • Documentation Index
  • Developer Hub
  • API Reference
  • Root OpenAPI
  • Registry OpenAPI
  • Run in Postman
  • Standards
  • Submit ERC-8004 Contract
  • Feature Your Agent
Best Plugins
  • Browse Plugins
  • Plugin Launches
  • Best Claude Plugins
  • Best Codex Plugins
  • Best Grok Plugins
  • Best Kimi Plugins
  • Best DeepSeek Plugins
  • Best Antigravity Plugins
  • Best MCP Servers
  • Best Cursor Plugins
  • Best OpenCode Plugins
Best Agents
  • Best ERC-8004 Agents
  • Best Virtuals Agents
  • Best MCP Servers
  • Best A2A Agents
  • Best x402 Payable
  • All Categories
Community
  • Telegram
  • X
More
  • About HOL
  • Sponsor
  • Advertise
  • Contact
  • Blog
  • GitHub
  • Privacy
  • Terms of Service
Settings

Copyright © 2026 HOL DAO LLC. All rights reserved.

Back to active CVEs
Critical · CVSS 9.4CVE-2026-40576GHSA-J98M-W3XP-9F56

excel-mcp-server has a Path Traversal issueCVE-2026-40576

Answer in brief

CVE-2026-40576 records a Critical severity (CVSS 9.4) vulnerability in excel-mcp-server has a Path Traversal issue. The current sources do not mark it as known exploited. The current feed maps excel-mcp-server (pip), excel-mcp-server (pypi). Check affected ranges and fixed versions before updating.

Analysis pending evidence review

HOL Guard separates source facts from reviewed analysis. See the methodology.

Published Apr 14, 2026Updated Oct 27, 2026Source checked Oct 27, 2026First seen by HOL Oct 27, 2026Material review Oct 27, 2026
Upstream Advisory

Record context

Vulnerability class
Path Traversal
EPSS
Not reported
CWE IDs
CWE-22
Source
GitHub Security Advisories
Source checked
Oct 27, 2026
References
7 linked sources
Open source record

Key facts

Risk
Critical · CVSS 9.4
Exploitation
Not marked as known exploited
Affected software
2 mapped packages or products
Fix availability
Available

Why this deserves its current priority

CVSS is 9.4. The current sources do not mark it as known exploited. Treat this as a source-backed prioritization signal, not a statement about your environment.

Analysis status

Analysis pending evidence review

Factual feed record only; HOL analysis is not approved for indexing. Read the methodology.

Affected scope and exposure questions

The current feed maps excel-mcp-server (pip), excel-mcp-server (pypi). Check affected ranges and fixed versions before updating.

Mapped affected packages and fixed versions
PackageAffected rangeFixed version
excel-mcp-serverpip<=0.1.70.1.8
excel-mcp-serverpypi>=0 <0.1.80.1.8

Recommended response

  1. 1Check inventory. Check lockfiles and deployed manifests for excel-mcp-server, excel-mcp-server.
  2. 2Review the reported fix. Update excel-mcp-server to 0.1.8; excel-mcp-server to 0.1.8 if you use the affected versions. Test the change in a non-production environment first.

Evidence timeline and material changes

  1. Published upstream

    Apr 14, 2026

    Evidence: source:ghsa:source_dates:source-dates:record
  2. Source modified

    Oct 27, 2026

    Evidence: source:ghsa:source_dates:source-dates:record
  3. First seen by HOL

    Oct 27, 2026

Sources and claim methodology

  • GitHub security advisorygithub.com
  • GitHub security advisorygithub.com
  • GitHub security advisorygithub.com
  • GitHub security advisorygithub.com
  • NVD vulnerability recordnvd.nist.gov
  • Source referencepypi.org
  • GitHub security advisorygithub.com
Upstream source description

## Summary A path traversal vulnerability exists in [`excel-mcp-server`](https://github.com/haris-musa/excel-mcp-server) versions up to and including `0.1.7`. When running in SSE or Streamable-HTTP transport mode (the documented way to use this server remotely), an unauthenticated attacker on the network can read, write, and overwrite arbitrary files on the host filesystem by supplying crafted `filepath` arguments to any of the 25 exposed MCP tool handlers. The server is intended to confine file operations to a directory set by the `EXCEL_FILES_PATH` environment variable. The function responsible for enforcing this boundary — `get_excel_path()` — fails to do so due to two independent flaws: it passes absolute paths through without any check, and it joins relative paths without resolving or validating the result. Combined with zero authentication on the default network-facing transport and a default bind address of `0.0.0.0` (all interfaces), this allows trivial remote exploitation. --- ## Details | Field | Value | |-------|-------| | **Package** | [`excel-mcp-server`](https://pypi.org/project/excel-mcp-server/) (PyPI) | | **Repository** | https://github.com/haris-musa/excel-mcp-server | | **Affected versions** | `<= 0.1.7` | | **Tested version** | `0.1.7` — commit [`de4dc75`](https://github.com/haris-musa/excel-mcp-server/commit/de4dc75f6ba629ccd2e097f5963235846be622e6) | | **CWE** | [CWE-22](https://cwe.mitre.org/data/definitions/22.html) — Improper Limitation of a Pathname to a Restricted Directory | | **CVSS 3.1** | **8.2 High** — `AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H` | | **Transports affected** | `sse`, `streamable-http` (network-facing) | | **Authentication required** | **None** | --- ## Vulnerable Code The root cause is in `src/excel_mcp/server.py`, lines 75–94: ```python def get_excel_path(filename: str) -> str: """Get full path to Excel file.""" # FLAW 1 — absolute paths bypass the sandbox entirely if os.path.isabs(filename): return filename # line 86: returned as-is # In SSE/HTTP mode, EXCEL_FILES_PATH is set if EXCEL_FILES_PATH is None: raise ValueError(...) # FLAW 2 — relative paths joined without boundary validation return os.path.join(EXCEL_FILES_PATH, filename) # line 94: "../" escapes ``` ### Why this is exploitable **Flaw 1 — Absolute path bypass (line 86):** If the attacker passes `filepath="/etc/shadow"` or `filepath="/home/user/secrets.xlsx"`, the function returns it unchanged. The sandbox directory `EXCEL_FILES_PATH` is never consulted. **Flaw 2 — Relative traversal (line 94):** `os.path.join("/srv/sandbox", "../../etc/passwd")` produces `"/srv/sandbox/../../etc/passwd"`, which resolves to `"/etc/passwd"`. No `os.path.realpath()` or `os.path.commonpath()` check is performed, so `../` sequences escape the sandbox. ### Contributing factors that increase severity 1. **Default bind address is `0.0.0.0`** (all interfaces) — `server.py` line 70: ```python host=os.environ.get("FASTMCP_HOST", "0.0.0.0"), ``` A user who follows the README and runs `uvx excel-mcp-server streamable-http` without explicitly setting `FASTMCP_HOST` exposes the server to their entire LAN. 2. **Zero authentication** — FastMCP's SSE and Streamable-HTTP transports ship with no authentication. The server adds none. Any TCP client that reaches port 8017 can call any tool. 3. **All 25 tool handlers are affected** — every `@mcp.tool()` decorated function calls `get_excel_path(filepath)` as its first action. This is not an isolated endpoint; it is the entire API surface. 4. **Arbitrary directory creation** — `src/excel_mcp/workbook.py` line 24 runs `path.parent.mkdir(parents=True, exist_ok=True)` before saving, meaning the attacker can create directory trees at any writable location. --- ## Proof of Concept ### Video demonstration [![asciicast](https://asciinema.org/a/2HVA3uKvVeFahIXY.svg)](https://asciinema.org/a/2HVA3uKvVeFahIXY) **asciinema recording:** https://asciinema.org/a/2HVA3uKvVeFahIXY I have also attached the full PoC shell script (`record-poc.sh`) and the Python exploit script (`exploit_test.py`) to a Google Drive for the maintainer to review and reproduce independently: **Google Drive (PoC scripts):** Shared privately via email Contents: - `record-poc.sh` — automated PoC recording script (bash) - `exploit_test.py` — Python exploit that tests all 7 primitives against a running server ### Setup ```bash # install pip install excel-mcp-server mcp httpx # start server with a sandbox directory mkdir -p /tmp/sandbox EXCEL_FILES_PATH=/tmp/sandbox FASTMCP_HOST=127.0.0.1 FASTMCP_PORT=8017 \ excel-mcp-server streamable-http ``` ### Exploit script The following Python script connects to the server with zero credentials and demonstrates all exploitation primitives: {REMOVING CAUSE FOR SAFETY CONCERNS} ### Results All 7 test cases passed against a live server instance: ``` CONFIRMED: 7 | FAILED: 0 [CONFIRMED] AUTH: Connected with ZERO authentication. 25 tools exposed. [CONFIRMED] P1-WRITE-ABS: file exists=True size=4783B (outside sandbox) [CONFIRMED] P2-WRITE-TRAVERSAL: escaped sandbox via ../ exists=True [CONFIRMED] P3-MKDIR: attacker directory tree created=True [CONFIRMED] P4-READ: exfiltrated SSN=True name=True [CONFIRMED] P5-OVERWRITE: victim data replaced=True [CONFIRMED] P6-STAT: server attempted to open /etc/hostname (format error confirms file access) ``` ### Filesystem evidence (independently verified after exploit) **Files created outside the sandbox:** ``` $ ls -la /tmp/cve-hunt/outside_sandbox/ -rw-rw-r-- 1 hitarth hitarth 4783 Apr 10 17:36 P1_absolute_write.xlsx -rw-rw-r-- 1 hitarth hitarth 4783 Apr 10 17:36 P2_traversal_write.xlsx ``` **Attacker-created directory tree:** ``` $ find /tmp/cve-hunt/attacker_dir /tmp/cve-hunt/attacker_dir /tmp/cve-hunt/attacker_dir/deep /tmp/cve-hunt/attacker_dir/deep/nested /tmp/cve-hunt/attacker_dir/deep/nested/x.xlsx ``` **Victim file after overwrite (original SSN destroyed):** ``` ('SSN', 'Name') ('ATTACKER-CONTROLLED', 'PWNED') # was: ('123-45-6789', 'Alice Johnson') ('987-65-4321', 'Bob Smith') ``` --- ## Impact An unauthenticated network attacker can: | What | How | Severity | |------|-----|----------| | **Read any `.xlsx` file** on the host | Supply absolute path to `read_data_from_excel` | Confidentiality loss — cross-tenant data theft of financial data, HR records, reports | | **Write `.xlsx` files anywhere** on the filesystem | Supply absolute path or `../` traversal to `create_workbook` or `write_data_to_excel` | Integrity loss — destroy or corrupt any writable `.xlsx`, plant malicious files | | **Create arbitrary directories** anywhere writable | `create_workbook` triggers `mkdir(parents=True)` on attacker-controlled path | Precursor to privilege escalation or DoS | | **Overwrite existing business files** with attacker content | `write_data_to_excel` with absolute path to target | Silent data corruption — audit reports, salary sheets, financial models | | **Fill disk** via repeated writes | Loop `create_workbook` with unique filenames | Denial of service — crash services dependent on free disk | | **Plant macro-enabled templates** (`.xltm`) at known shared paths | `create_workbook` at path like `/home/user/Templates/report.xltm` | Client-side RCE chain when downstream user opens the template in Excel | ### Who is affected Anyone running `excel-mcp-server` in SSE or Streamable-HTTP mode on a reachable network — which is the documented and recommended deployment for remote use. The project README explicitly states: - *"Works both locally and as a remote service"* - *"Streamable HTTP Transport (Recommended for remote connections)"* The server has **3,655+ GitHub stars** and is published on **PyPI** with active downloads. --- ## Suggested Fix Replace `get_excel_path()` with a version that enforces the sandbox boundary: ```python import os def get_excel_path(filename: str) -> str: if EXCEL_FILES_PATH is None: # stdio mode: local caller is trusted if not os.path.isabs(filename): raise ValueError("must be absolute path in stdio mode") return filename # Remote mode (SSE / streamable-http): enforce sandbox if os.path.isabs(filename): raise ValueError("absolute paths are not permitted in remote mode") if "\x00" in filename: raise ValueError("NUL byte in filename") base = os.path.realpath(EXCEL_FILES_PATH) candidate = os.path.realpath(os.path.join(base, filename)) if not candidate.startswith(base + os.sep) and candidate != base: raise ValueError(f"path escapes EXCEL_FILES_PATH: {filename}") return candidate ``` ## References - [CWE-22: Improper Limitation of a Pathname to a Restricted Directory](https://cwe.mitre.org/data/definitions/22.html) - [OWASP Path Traversal](https://owasp.org/www-community/attacks/Path_Traversal) - [Model Context Protocol Specification](https://modelcontextprotocol.io/) - [FastMCP Documentation](https://github.com/jlowin/fastmcp)

Quoted source text, attributed separately from HOL analysis.

Related CVEs

  • FileBrowser Quantum: Symlink following escapes user scope allowing arbitrary file read outside the served directoryAlso CWE-22