Skip to content

Document Windows stdio command-shell parsing - #1760

Open
andyst-dev wants to merge 1 commit into
modelcontextprotocol:mainfrom
andyst-dev:docs/windows-stdio-shell-security
Open

Document Windows stdio command-shell parsing#1760
andyst-dev wants to merge 1 commit into
modelcontextprotocol:mainfrom
andyst-dev:docs/windows-stdio-shell-security

Conversation

@andyst-dev

Copy link
Copy Markdown

Summary

  • document on the public Command and Arguments API that Windows stdio launches are routed through cmd.exe /c
  • clarify that list-shaped arguments are still interpreted by the Windows command shell
  • add a security warning to the stdio transport guide describing the SDK's limited escaping and recommending validation or allowlisting

Motivation

Callers can otherwise reasonably assume that Arguments reaches the child as an argv vector without shell interpretation. On Windows, that assumption is false for commands other than cmd.exe, which can invalidate command-injection threat models.

Fixes #1751.

Validation

  • dotnet build — 0 warnings, 0 errors
  • make generate-docs — DocFX completed with --warningsAsErrors true, 0 warnings, 0 errors
  • git diff --check

@andyst-dev
andyst-dev force-pushed the docs/windows-stdio-shell-security branch from 4895180 to 4d44bed Compare July 28, 2026 09:43
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.

Document the Windows cmd.exe /c interposition as a security-relevant property, not just a quoting bug

1 participant