| タイトル | mastergo-design mastergo-magic-mcp 0.2.0 Improper Access Control |
|---|
| 説明 | A vulnerability was found in mastergo-design/mastergo-magic-mcp. The issue affects the MCP tool mcp__getComponentGenerator and the parameter rootPath.
The mcp__getComponentGenerator tool accepts a caller-controlled rootPath and constructs a .mastergo directory under that path using raw string concatenation. The implementation then calls fs.mkdirSync with recursive creation enabled and writes generated component workflow files under the attacker-chosen rootPath. There is no path.resolve-based confinement, no trusted workspace boundary, and no rejection of absolute paths or traversal segments.
An MCP client that can invoke this tool may cause the server process to create directories and write project-shaped files under arbitrary process-writable paths. The written files include .mastergo/component-workflow.md, a JSON file derived from a MasterGo API response, and image assets. The content is not fully attacker-controlled, but the write location is controlled by the caller, and missing parent directories may be created automatically.
Affected package: @mastergo/magic-mcp
Affected tool: mcp__getComponentGenerator
Affected parameter: rootPath
Affected file: src/tools/get-component-workflow.ts
CWE: CWE-22 / CWE-73 / CWE-20
CVSS v3.1: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Suggested severity: Medium
Suggested remediation: resolve rootPath with realpath and require it to remain inside an operator-approved workspace or explicitly selected project root before creating directories or writing files. Reject absolute paths, traversal attempts, and symlink escapes outside the trusted root. |
|---|
| ソース | ⚠️ https://github.com/mastergo-design/mastergo-magic-mcp/issues/90 |
|---|
| ユーザー | Mcfly_Zhang (UID 98877) |
|---|
| 送信 | 2026年06月12日 04:18 (1 月 ago) |
|---|
| モデレーション | 2026年07月14日 17:40 (1 month later) |
|---|
| ステータス | 承諾済み |
|---|
| VulDBエントリ | 378330 [mastergo-design mastergo-magic-mcp 迄 0.2.0 mcp__getComponentGenerator component-workflow.md execute rootPath ディレクトリトラバーサル] |
|---|
| ポイント | 20 |
|---|