CVE-2026-7738
Path Traversal in puchunjie doc-tools-mcp
Publication date: 2026-05-04
Last updated on: 2026-05-05
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| puchunjie | doc-tools-mcp | 1.0.18 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-7738 is a security flaw in the doc-tools-mcp software, specifically in the functions create_document and open_document. The vulnerability arises because the software accepts a user-supplied filePath argument without proper validation and passes it directly to file system operations like fs.writeFile or fs.readFile.
This lack of validation allows an attacker with network access to the MCP interface to perform path traversal attacks, enabling them to read or write arbitrary Word document files (.docx) anywhere on the server's filesystem where the MCP process has permissions.
The vulnerability can be exploited remotely and has been publicly disclosed with proof of concept exploits demonstrating arbitrary file read and write capabilities.
How can this vulnerability impact me? :
This vulnerability can have serious impacts including unauthorized data exposure, loss of data integrity, and potential disruption of service.
- Attackers can read sensitive Word documents stored anywhere on the server.
- Attackers can write or modify Word documents arbitrarily, potentially corrupting data or injecting malicious content.
- The service running the MCP server could be disrupted by unauthorized file operations.
The severity of these impacts is high for confidentiality, integrity, and availability of the affected system.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring network access to the MCP server interface, which runs by default on port 8765. Suspicious usage of the create_document or open_document functions with unusual or absolute file paths may indicate exploitation attempts.
Since the vulnerability involves arbitrary file read/write via the filePath argument, detection can include checking logs or network traffic for requests containing path traversal sequences (e.g., ../) or absolute paths.
Commands to help detect exploitation attempts might include:
- Using network monitoring tools (e.g., tcpdump or Wireshark) to capture traffic on port 8765 and filter for suspicious payloads.
- Checking server logs for calls to create_document or open_document with file paths containing traversal patterns.
- Example command to monitor network traffic on port 8765: sudo tcpdump -A -s 0 'tcp port 8765'
- Example command to search logs for suspicious file paths: grep -E '\.\./|/[^/]' /path/to/mcp-server/logs/*
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include:
- Do not expose the MCP server interface to untrusted or public networks.
- Restrict access to the MCP tools to trusted clients only.
- Run the MCP server process with the lowest possible privileges to limit filesystem access.
- Configure filesystem permissions to restrict read/write access to only necessary directories.
- Monitor and audit usage of create_document and open_document functions for suspicious file paths.
A permanent fix involves validating the filePath argument to ensure it remains within a dedicated document root directory and applying this validation consistently across all tools accepting filePath.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability allows arbitrary file read and write operations on the server's filesystem, leading to potential data exposure, integrity loss, and service disruption.
Such risks can impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of sensitive data confidentiality, integrity, and availability.
If exploited, this vulnerability could result in unauthorized access to personal or protected health information, violating data protection requirements and potentially leading to regulatory penalties.
Mitigations such as restricting access to trusted clients, running the server with low privileges, and validating file paths are necessary to reduce compliance risks.