# CVE-2026-40576: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in excel-mcp-server

- Severity: Critical 9.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.67%, higher than 47% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-14T00:03:17.000Z
- Modified: 2026-10-27T16:45:05.545Z
- Also known as: GHSA-j98m-w3xp-9f56, PYSEC-2026-331
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- haris-musa excel-mcp-server: < 0.1.8
- excel-mcp-server (PyPI): before 0.1.8

## Every score

- GitHub_M: 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`
- CISA-ADP: 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`
- GitHub: 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`
- PyPA Advisory Database: 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`

## References

- <https://github.com/haris-musa/excel-mcp-server/security/advisories/GHSA-j98m-w3xp-9f56> (exploit, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40576> (advisory)
- <https://github.com/haris-musa/excel-mcp-server/commit/f51340ecd5778952405044b203d3a2d4c8a46833> (web)
- <https://github.com/haris-musa/excel-mcp-server> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/excel-mcp-server/PYSEC-2026-331.yaml> (web)
- <https://pypi.org/project/excel-mcp-server> (package, web)
- <https://github.com/advisories/GHSA-j98m-w3xp-9f56> (advisory)

## Sources

- CVE List: [CVE-2026-40576](https://www.cve.org/CVERecord?id=CVE-2026-40576), CVE Terms of Use, modified 2026-04-21
- GitHub Advisory Database: [GHSA-j98m-w3xp-9f56](https://github.com/advisories/GHSA-j98m-w3xp-9f56), CC-BY-4.0, modified 2026-10-27
- NVD: [CVE-2026-40576](https://nvd.nist.gov/vuln/detail/CVE-2026-40576), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-331](https://osv.dev/vulnerability/PYSEC-2026-331), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-40576 · Whole record: https://cve.day/CVE-2026-40576.json · Rebuilt by cve.day 2026-11-25T22:59:19.118Z
