mkdocs-mcp-plugin Path Traversal Vulnerability
A path traversal vulnerability exists in douinc mkdocs-mcp-plugin up to version 0.4.1, allowing remote attackers to access unauthorized files through manipulation of the docs_dir/file_path argument in the read_document/list_documents functions within server.py.
A path traversal vulnerability, identified as CVE-2026-7159, has been discovered in douinc’s mkdocs-mcp-plugin, affecting versions up to 0.4.1. The flaw resides within the read_document and list_documents functions of the server.py file. By manipulating the docs_dir or file_path arguments, a remote attacker can bypass intended access restrictions and potentially read sensitive files on the server. A public exploit is available, increasing the risk of exploitation. The vendor has acknowledged the vulnerability and plans to release a fix in the coming days. This vulnerability poses a significant risk to systems using the affected plugin, potentially exposing sensitive data.
Attack Chain
- Attacker identifies a server running a vulnerable version (<= 0.4.1) of the
mkdocs-mcp-plugin. - Attacker crafts a malicious HTTP request targeting the
read_documentorlist_documentsendpoint. - The crafted request includes a manipulated
docs_dirorfile_pathparameter designed to traverse the file system. This commonly involves using sequences like../to move up directories. - The vulnerable
server.pyscript fails to properly sanitize or validate the provided path. - The application attempts to read a file outside the intended document root, based on the attacker-controlled path.
- If successful, the contents of the targeted file are returned in the HTTP response to the attacker.
- The attacker can repeat this process to enumerate and access various sensitive files.
- The attacker gains unauthorized access to sensitive information, potentially including configuration files, source code, or user data.
Impact
Successful exploitation of this path traversal vulnerability (CVE-2026-7159) can lead to unauthorized access to sensitive files on the server. This could include configuration files, application source code, or user data. The impact ranges from information disclosure to potential compromise of the entire system, depending on the nature of the exposed data. Given the public availability of an exploit, affected systems are at increased risk of attack. The vendor is planning to release a fix soon.
Recommendation
- Apply the patch for mkdocs-mcp-plugin as soon as it is released by the vendor to remediate CVE-2026-7159.
- Deploy the Sigma rule
Detect Mkdocs Path Traversal Attemptto identify exploitation attempts in web server logs. - Monitor web server logs for suspicious URL patterns containing path traversal sequences like
../targeting file access endpoints, as detailed in the Attack Chain.
Detection coverage 2
Detect Mkdocs Path Traversal Attempt
highDetects potential path traversal attempts targeting mkdocs-mcp-plugin by looking for '../' sequences in the URL.
Detect Mkdocs Directory Listing Traversal
highDetects directory listing traversal attempts with '../' sequences in the URL
Detection queries are kept inside the platform. Get full rules →