CVE-2026-40576 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in excel-mcp-server
Unauthenticated attackers can read, write, or overwrite arbitrary files on the host via path traversal in the Excel MCP server's remote transport mode.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-40576?
CVE-2026-40576 is a critical path traversal vulnerability in haris-musa excel-mcp-server, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-22
Which versions are affected by CVE-2026-40576?
3 open source packages ship an affected version, including excel-mcp-server.
| Package | Affected | Fixed in |
|---|---|---|
excel-mcp-server PyPI | All versions | 0.1.8 |
excel-mcp-server PyPI | All versions | 0.1.8 |
excel-mcp-server PyPI | All versions | 0.1.8 |
How do I fix CVE-2026-40576?
Upgrade excel-mcp-server to 0.1.8 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-40576 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40576 exists.
Sources
Also known as GHSA-j98m-w3xp-9f56, PYSEC-2026-331.