Skip to content

fix(mcp): enforce trusted workspace root - #41

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-0551
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-0551

Conversation

@cursor

@cursor cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

The new sandbox read_workspace_file / write_workspace_file tools accepted a caller-supplied workspace_root. MultiMCP only filled the trusted trace workspace when the argument was absent, so a model-produced tool call could redefine the sandbox root and read or overwrite files outside the intended ClawBench workspace.

Root cause

workspace_root was treated as a public tool argument instead of a trusted routing value. The router used setdefault, leaving hostile or mistaken caller-provided roots intact.

Fix

MultiMCP.route_tool_call now overwrites workspace_root with the trace-scoped workspace for workspace file tools whenever a trusted workspace is present.

Validation

  • python3 -m pytest tests/test_mockehr_mcp.py -q
Open in Web View Automation 

Co-authored-by: Ritesh Verma <riteshverma@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant