CVE-2026-40576
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in excel-mcp-server
excel-mcp-server is a Model Context Protocol server for Excel file manipulation. A path traversal vulnerability exists in 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. This vulnerability is fixed in 0.1.8.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.4
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in excel-mcp-server
excel-mcp-server is a Model Context Protocol server for Excel file manipulation. A path traversal vulnerability exists in 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. This vulnerability is fixed in 0.1.8.
- Record
CVE-2026-40576- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2026-24177
9.4
excel-mcp-server is a Model Context Protocol server for Excel file manipulation. A path traversal vulnerability exists in 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. This vulnerability is fixed in 0.1.8.
- Record
EUVD-2026-24177- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j98m-w3xp-9f56
9.4
excel-mcp-server has a Path Traversal issue
Summary
A path traversal vulnerability exists in 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 (PyPI) |
| Repository | https://github.com/haris-musa/excel-mcp-server |
| Affected versions | <= 0.1.7 |
| Tested version | 0.1.7 — commit de4dc75 |
| CWE | CWE-22 — 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:
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
-
Default bind address is
0.0.0.0(all interfaces) —server.pyline 70:host=os.environ.get("FASTMCP_HOST", "0.0.0.0"),A user who follows the README and runs
uvx excel-mcp-server streamable-httpwithout explicitly settingFASTMCP_HOSTexposes the server to their entire LAN. -
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.
-
All 25 tool handlers are affected — every
@mcp.tool()decorated function callsget_excel_path(filepath)as its first action. This is not an isolated endpoint; it is the entire API surface. -
Arbitrary directory creation —
src/excel_mcp/workbook.pyline 24 runspath.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
…
- Record
GHSA-j98m-w3xp-9f56- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
9.4
excel-mcp-server is a Model Context Protocol server for Excel file manipulation. A path traversal vulnerability exists in 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. This vulnerability is fixed in 0.1.8.
- Record
CVE-2026-40576- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
9.4
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in excel-mcp-server
excel-mcp-server is a Model Context Protocol server for Excel file manipulation. A path traversal vulnerability exists in 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. This vulnerability is fixed in 0.1.8.
- Record
CVE-2026-40576- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-j98m-w3xp-9f56
9.4
excel-mcp-server has a Path Traversal issue
Summary
A path traversal vulnerability exists in 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 (PyPI) |
| Repository | https://github.com/haris-musa/excel-mcp-server |
| Affected versions | <= 0.1.7 |
| Tested version | 0.1.7 — commit de4dc75 |
| CWE | CWE-22 — 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:
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
-
Default bind address is
0.0.0.0(all interfaces) —server.pyline 70:host=os.environ.get("FASTMCP_HOST", "0.0.0.0"),A user who follows the README and runs
uvx excel-mcp-server streamable-httpwithout explicitly settingFASTMCP_HOSTexposes the server to their entire LAN. -
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.
-
All 25 tool handlers are affected — every
@mcp.tool()decorated function callsget_excel_path(filepath)as its first action. This is not an isolated endpoint; it is the entire API surface. -
Arbitrary directory creation —
src/excel_mcp/workbook.pyline 24 runspath.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
…
- Record
GHSA-j98m-w3xp-9f56- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVPYSEC-2026-331
9.4
excel-mcp-server has a Path Traversal issue
Summary
A path traversal vulnerability exists in 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 (PyPI) |
| Repository | https://github.com/haris-musa/excel-mcp-server |
| Affected versions | <= 0.1.7 |
| Tested version | 0.1.7 — commit de4dc75 |
| CWE | CWE-22 — 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:
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
-
Default bind address is
0.0.0.0(all interfaces) —server.pyline 70:host=os.environ.get("FASTMCP_HOST", "0.0.0.0"),A user who follows the README and runs
uvx excel-mcp-server streamable-httpwithout explicitly settingFASTMCP_HOSTexposes the server to their entire LAN. -
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.
-
All 25 tool handlers are affected — every
@mcp.tool()decorated function callsget_excel_path(filepath)as its first action. This is not an isolated endpoint; it is the entire API surface. -
Arbitrary directory creation —
src/excel_mcp/workbook.pyline 24 runspath.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
…
- Record
PYSEC-2026-331- CVSS 3.1
- 9.4 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
excel-mcp-serverPyPI |
through 0.1.7 | 0.1.8 |
excel-mcp-serverPyPI |
before 0.1.8, plus listed versions 0.1.10.1.20.1.30.1.40.1.50.1.60.1.7 |
0.1.8 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-40576 is a critical vulnerability (CVSS 9.4) in Haris-musa Excel-mcp-server, published April 14, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.46%, the 40th percentile. Fixed in excel-mcp-server 0.1.8.
References
github.com/haris-musa/excel-mcp-server/security/advisories/GHSA-j98m-w3xp-9f56
github.com/haris-musa/excel-mcp-server/commit/f51340ecd5778952405044b203d3a2d4c8a46833
nvd.nist.gov/vuln/detail/CVE-2026-40576
github.com/pypa/advisory-database/tree/main/vulns/excel-mcp-server/PYSEC-2026-331.yaml
pypi.org/project/excel-mcp-server
github.com/advisories/GHSA-j98m-w3xp-9f56
github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40576.json
github.com/haris-musa/excel-mcp-server
Left out here: the rest of 3 source descriptions. The JSON record has them.