Executive brief
A vulnerability exists in MasterGo Magic MCP, a tool used to connect design software with AI models. An attacker can manipulate file paths to create unauthorized directories or overwrite specific files on the system where the tool is running. This could lead to the corruption of project data or the placement of files in sensitive locations, potentially disrupting operations or misleading other automated systems.
Technical details
A path traversal vulnerability exists in the 'execute' function of the 'mcp__getComponentGenerator' tool within mastergo-magic-mcp (up to 0.2.0). The root cause is the lack of input validation or sanitization on the 'rootPath' argument, which is directly concatenated into a file path string and passed to 'fs.mkdirSync' with the 'recursive: true' flag and 'fs.writeFileSync'. A local attacker or a malicious LLM/MCP client can provide a manipulated 'rootPath' (e.g., using '../' sequences) to create arbitrary directory structures or overwrite files with project-defined templates and JSON data from the MasterGo API. While the attacker does not have full control over the file content, the ability to control the destination path allows for filesystem probing and data planting. As of the advisory date, the project has not responded to the issue report.
Affected products
- mastergo-design mastergo-magic-mcp up to 0.2.0
Timeline
- 2026-05-29: other: Vulnerability discovered and tested on version 0.1.7-beta.0
- 2026-07-14: disclosed: Public disclosure of the exploit and vulnerability details
- 2026-07-14: advisory