fix(filesystem): reject Windows paths on POSIX by CryoThrust · Pull Request #4704 · modelcontextprotocol/servers · GitHub
Skip to content

fix(filesystem): reject Windows paths on POSIX - #4704

Merged
olaservo merged 1 commit into
modelcontextprotocol:mainfrom
CryoThrust:fix/filesystem-posix-drive-path
Aug 30, 2026
Merged

fix(filesystem): reject Windows paths on POSIX#4704
olaservo merged 1 commit into
modelcontextprotocol:mainfrom
CryoThrust:fix/filesystem-posix-drive-path

Conversation

@CryoThrust

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #4686.

On POSIX hosts, a Windows drive path such as C:\\Users\\me\\notes\\file.md was treated as a relative filename inside the allowed directory. The operation could report success while writing to the wrong path.

Reject drive-letter forms before relative path resolution when running on POSIX. Windows behavior and normal POSIX paths are unchanged. A regression test covers the rejection.

Verification

  • git diff --check passes.
  • Local Vitest execution is currently blocked because the installed Node binary cannot start: Homebrew's simdjson dylib is missing.

@CryoThrust

Copy link
Copy Markdown
Contributor Author

@tarunag10

Copy link
Copy Markdown

@olaservo
olaservo merged commit a6cdbf4 into modelcontextprotocol:main Aug 30, 2026
16 checks passed
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.

filesystem: a Windows-style path is silently accepted on POSIX and becomes a literal filename inside the allowed root

3 participants