Skip to content

Network tab records X-Auth-Token, Api-Key, X-Goog-Api-Key, Ocp-Apim-Subscription-Key, PRIVATE-TOKEN unredacted (CLI servers/show treats them as sensitive) #3076

Duplicate

Description

@CloneOfAlex

Which version line?

v2 — current (@modelcontextprotocol/inspector@latest)

Which client?

All / shared core

Inspector version

2.17.0 (main @ 2069a1a, built from source)

Node version

v22.23.5

Operating system (and browser, for the web client)

Linux

Transport

Streamable HTTP

MCP server under inspection

Any Streamable HTTP server configured with a custom credential header (custom headers, #1915), e.g. --header "X-Auth-Token: <token>" or Azure APIM's Ocp-Apim-Subscription-Key.

Steps to reproduce

Call redactSensitiveHeaders from core/mcp/fetchTracking.ts (the redaction used by the Network tab) on main:

redactSensitiveHeaders({ "X-Auth-Token": "t1", "Api-Key": "t2", "X-Goog-Api-Key": "t3",
  "Ocp-Apim-Subscription-Key": "t4", "PRIVATE-TOKEN": "t5", "X-Secret": "t6", "DPoP": "t7",
  "X-API-Key": "t8", "Authorization": "t9" })

Or connect the web client to an HTTP server with --header "X-Auth-Token: secret" and open the Network tab.

Expected behavior

Credential-bearing headers are masked in the Network tab and its exports, consistently with the CLI. isSensitiveHeader in core/cli/handlers/servers-list.ts:271 (used by servers/show / servers/list) already treats any name containing auth, cookie, secret, token, password, api-key or apikey as sensitive.

Actual behavior

{"X-Auth-Token":"t1","Api-Key":"t2","X-Goog-Api-Key":"t3","Ocp-Apim-Subscription-Key":"t4","PRIVATE-TOKEN":"t5","X-Secret":"t6","DPoP":"t7","X-API-Key":"[REDACTED]","Authorization":"[REDACTED]"}

The Network tab uses an exact six-name set (SENSITIVE_HEADERS, fetchTracking.ts:10: authorization, cookie, set-cookie, proxy-authorization, x-api-key, x-mcp-remote-auth). The same custom header that servers/show masks is recorded in clear in the Network tab. Body field names have the same gap: apiKey, api_key, secret and private_key are not in SENSITIVE_BODY_FIELDS.

Logs, errors, or screenshots

Suggested fix: share one isSensitiveHeader predicate between the CLI and fetchTracking. Add subscription-key and private-token to it, and treat every user-configured custom header value as sensitive in the Network tab (the user configured it, so the client knows it's a credential slot).

Already prototyped a fix?

No response

Before you submit

  • I searched existing issues and this is not a duplicate.
  • This is not a security vulnerability report (those go through the private advisory process).

Activity

  1. added
    bug
    on Nov 28, 2026
  2. added
    v2
    on Nov 30, 2026
  3. cliffhall commented on Nov 30, 2026

    @cliffhall
    Member

    Triage: Priority High (total 10)

    • Severity 4 — credential-bearing headers (X-Auth-Token, Api-Key, Ocp-Apim-Subscription-Key, PRIVATE-TOKEN, …) show unredacted in the Network tab and its exports, inconsistent with the CLI's isSensitiveHeader
    • Urgency 4 — affects the published 2.17.0 for anyone using custom credential headers
    • Bonuses: +1 bug label, +1 security-related (secret exposure)

    Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

  4. cliffhall commented on Nov 30, 2026

    @cliffhall
    Member

    Thanks for the precise repro. Folding this into #3023, which has the same root cause, and closing this one as a duplicate.

    The headers you found are real gaps, but the fix goes the other way from widening capture-time redaction. The Network tab is meant to mask secrets (••••••••) with a Reveal toggle, and redact only where data leaves memory (persisted session storage, logs, exports). Since #1561/#1593, core redacts at capture time instead. That is why Reveal shows [REDACTED] (#3023), and why headers outside core's short list are shown in plain text with no masking at all (this issue). Widening the capture-time list would make those headers unrevealable too.

    #3023 now covers both: real values kept in the live log, mask/reveal for headers using the broad name rule you pointed at (isSensitiveHeader in core/cli/handlers/servers-list.ts, plus DPoP and the others you listed), and redaction moved to the persistence, logging and export sinks. Details: #3023

  5. cliffhall commented on Nov 30, 2026

    @cliffhall
    Member

    Update: the fix is now tracked in #3077, which supersedes #3023 and covers both reports, so this issue is re-pointed as a duplicate of #3077. The fix PR will still list this issue as closed, so @CloneOfAlex is credited in the release notes. Thank you!

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

    bugv2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions