LMC-01 · Filesystem tool exposed to the agent without a path allowlist
- Severity
- High — Fixed and verified
- Location
mcp-server/src/tools/files.ts (lines 12–48)- Observation
- The practice’s internal MCP server gave the assistant a readFiles tool that accepted any absolute path, including the payroll exports folder and the .env file holding the provider API key. Any prompt or fetched web page that reached the model could direct it to read those files and quote their contents into the transcript.
- Remediation
- Scoped the tool to an allowlisted workspace directory, rejected .. traversal and symlinks at the server boundary, and moved the provider key into the server process environment where the tool layer cannot read it.
- Fix check
- Asked the agent (via a deliberately poisoned note in a fetched page) to read the payroll path; the tool now returns an authorisation error, and the transcript shows no file contents.