File resource read errors expose absolute server paths to MCP clients
Author: twishabansalCreated Oct 1, 2026Updated Oct 1, 2026
Labelstype: bugpriority: p2
Prerequisites
- I've searched the current open issues
- I've updated to the latest version of Toolbox
Toolbox version
v1.13.1 (also on main @ 912189f)
Environment
Any OS. Any transport that serves resources/read.
Client
Any MCP client. Reproduces with curl.
Expected Behavior
The client gets a short error that names the resource or URI. The full error, with paths, goes to the server log. Missing files still return INVALID_PARAMS.
Current Behavior
The client gets absolute server paths:
failed to read resource: failed to open file "/srv/toolbox/docs/q.md": permission deniedFileResource.ReadandFileTemplate.Readput paths in their errors.resources/readsendserr.Error()to the client: v20241105, v20250326, v20250618, v20251125, v20260728.skills/listandskills/getin #4050 return the same errors (list, get).
Steps to reproduce?
- Configure a
fileresource and start Toolbox. chmod 000the file.- Call
resources/readwith its URI. - The error message contains the file's absolute path.
Additional Details
- Suggested fix: sanitise in
internal/resources/file, not per handler, and keeperrors.Is(err, fs.ErrNotExist)working. #4050 tried a skills-only fix and dropped it.
Source: googleapis/mcp-toolbox