Problem
ValidatePath uses Path.GetFullPath and claims it handles symlinks, but GetFullPath only normalizes path syntax. It does not resolve filesystem symlink/junction targets.
Evidence
Editor/MCPServerMethods.Utils.cs:40-46 calls Path.GetFullPath(cleanPath) and checks the resulting string starts with the project root.
- The comment says this handles symlinks, but .NET path normalization does not resolve symlink targets.
- File tools then operate on the returned path.
Impact
A symlink inside the project can point outside the project root. A path such as Assets/link_to_home/.ssh/id_rsa can pass the lexical project-root check while file I/O follows the symlink outside the project.
Suggested fix
Resolve real filesystem targets before allowing read/write, or explicitly reject symlink/junction traversal under project roots for file operations. Update the misleading comment either way.
Source report
Imported from audit report item: security (15) / Editor/MCPServerMethods.Utils.cs:24.
Problem
ValidatePathusesPath.GetFullPathand claims it handles symlinks, butGetFullPathonly normalizes path syntax. It does not resolve filesystem symlink/junction targets.Evidence
Editor/MCPServerMethods.Utils.cs:40-46callsPath.GetFullPath(cleanPath)and checks the resulting string starts with the project root.Impact
A symlink inside the project can point outside the project root. A path such as
Assets/link_to_home/.ssh/id_rsacan pass the lexical project-root check while file I/O follows the symlink outside the project.Suggested fix
Resolve real filesystem targets before allowing read/write, or explicitly reject symlink/junction traversal under project roots for file operations. Update the misleading comment either way.
Source report
Imported from audit report item:
security (15)/Editor/MCPServerMethods.Utils.cs:24.