Skip to content

mcp: rmcp logs request arguments verbatim at DEBUG, so a settings_set writes its secret to stderr #1194

Open

Description

@chappie-daemon

Found by: the security lens in review round 1 of job 033-admin-mcp-server (round-1/review-security.md, note 2), at 7a1cde0e.

rmcp 3.11.0 logs inbound request arguments verbatim at DEBUG (service.rs:1628). With --log-level debug, a settings_set put the target's bot token on stderr twice — and the stdio mode's stderr is exactly where the operator reads the log.

The default is INFO and no MCP caller can raise it, so this is not reachable today; it is reachable by the operator's own --log-level flag.

Fix direction: when the MCP server is composed, install a field filter that drops the SDK's request-argument fields (or a tracing filter scoped to the rmcp target) at DEBUG, and a test that composes at DEBUG, writes a token-bearing setting, and asserts the value never appears on stderr. Documentation alone is the smaller fix but leaves the trap armed.

Activity

  1. added
    security
    rewrite
    rust
    factory
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    factoryrewriterustsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions