CVE-2026-15749 Overview
CVE-2026-15749 is a path traversal vulnerability [CWE-22] in the mastergo-design/mastergo-magic-mcp project through version 0.2.0. The flaw resides in the execute function of src/tools/get-c2d.ts within the mcp__C2d component. An attacker with local access can manipulate the filePath argument to escape the intended directory and access files outside its boundaries. Public exploit details have been released, increasing the likelihood of opportunistic misuse. The maintainers were notified through a GitHub issue but had not responded at the time of disclosure.
Critical Impact
Local attackers can read or interact with files outside the intended directory scope by supplying crafted path arguments to the mcp__C2d tool.
Affected Products
- mastergo-design/mastergo-magic-mcp versions up to and including 0.2.0
- Component: mcp__C2d
- File: src/tools/get-c2d.ts — function execute
Discovery Timeline
- 2026-07-14 - CVE-2026-15749 published to NVD
- 2026-07-15 - Last updated in NVD database
Technical Details for CVE-2026-15749
Vulnerability Analysis
The vulnerability is a classic path traversal weakness in a Model Context Protocol (MCP) tool implementation. The execute function in src/tools/get-c2d.ts accepts a filePath parameter from the caller and uses it without sufficient normalization or containment checks. As a result, sequences such as ../ allow the resolved path to fall outside the expected working directory. Because MCP tools typically run with the privileges of the invoking user process, the impact scales with the permissions of the account running the tool. Exploitation requires local access, which limits remote abuse but still poses risk in shared or multi-tenant developer environments.
Root Cause
The root cause is missing or inadequate input validation on the filePath argument passed to the execute handler of the mcp__C2d component. The code does not canonicalize the path and does not verify that the resolved location remains within an allow-listed base directory before performing file operations.
Attack Vector
An attacker with local access invokes the mcp__C2d tool and supplies a filePath value containing directory traversal sequences. The unvalidated path is passed to file system APIs, causing the tool to read from locations outside the intended scope. No authentication uplift is required beyond the privileges already available to the caller. Refer to the GitHub Issue #88 Discussion and VulDB CVE-2026-15749 entries for additional technical context.
Detection Methods for CVE-2026-15749
Indicators of Compromise
- Invocations of the mcp__C2d tool where the filePath argument contains ../, ..\\, absolute paths, or URL-encoded traversal sequences such as %2e%2e%2f.
- File access events originating from the mastergo-magic-mcp process targeting paths outside the project working directory.
- Unexpected reads of sensitive local files (for example, SSH keys, environment files, or credential stores) by the Node.js process hosting the MCP server.
Detection Strategies
- Enable verbose logging on the MCP server and audit the filePath argument for traversal patterns before the execute function is invoked.
- Correlate process-level file access telemetry against an allow-list of expected project directories to surface out-of-scope reads.
- Perform static analysis of src/tools/get-c2d.ts in installed versions to confirm the presence of the unpatched execute implementation.
Monitoring Recommendations
- Monitor developer workstations and CI hosts running MCP servers for anomalous file read activity by Node.js runtimes.
- Alert on new installations or updates of mastergo-magic-mcp at or below version 0.2.0 across managed endpoints.
- Track outbound data movements from developer environments that host MCP tools to identify potential exfiltration following traversal.
How to Mitigate CVE-2026-15749
Immediate Actions Required
- Inventory systems where mastergo-magic-mcp is installed and disable the mcp__C2d tool if it is not required.
- Restrict local access to hosts running the MCP server to trusted users only.
- Run the MCP process under a least-privilege account with no read access to sensitive system or user directories.
Patch Information
At the time of publication, no vendor patch was available. The project was notified through GitHub Issue #88 but has not responded. Monitor the Mastergo Magic MCP repository for updates beyond version 0.2.0 that address the traversal in src/tools/get-c2d.ts.
Workarounds
- Wrap or fork the execute function in src/tools/get-c2d.ts to canonicalize filePath with path.resolve and verify the resolved value starts with an approved base directory.
- Reject any filePath input containing .., absolute path prefixes, or encoded traversal sequences before file operations occur.
- Sandbox the MCP process using OS-level controls such as containerization, AppArmor, or SELinux to constrain the file system view available to the tool.
# Configuration example: run the MCP server with a restricted working directory
# and drop privileges before invocation
cd /opt/mastergo-mcp/sandbox
sudo -u mcp-runner --preserve-env=PATH \
node ./node_modules/mastergo-magic-mcp/dist/index.js
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

