Repository navigation
Done
Description
Supersedes #3023 (reported by @mikecat) and #3076 (reported by @CloneOfAlex), which are closed as duplicates of this issue. Thanks also to @aniket-r2Dev2 for tracing the capture-time redaction on #3023.
For the PR: link #3023 and #3076 as closing references alongside this issue (
Closes #<this>, closes #3023, closes #3076plusaddCloseIssueReferencesfor all three) so both reporters are credited in the release notes' Thanks section.
Problem
The Network tab is meant to mask secrets for display (••••••••) and show the real value when the user clicks Reveal. Two symptoms show it doesn't:
- Reveal reveals nothing (Network tab: Reveal doesn't reveal secrets, and credential headers aren't masked (incl. #3076) #3023). On an OAuth
/tokenrequest or response, Reveal flips the label to "Secrets revealed", but the values only change from••••••••to[REDACTED]/%5BREDACTED%5D. - Credential headers show in plain text (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).
X-Auth-Token,Api-Key,X-Goog-Api-Key,Ocp-Apim-Subscription-Key,PRIVATE-TOKEN,X-SecretandDPoPappear unmasked in the Network tab and its exports, whileAuthorizationshows[REDACTED], which can't be revealed. The CLI'sservers/showalready treats any*auth*/*token*/*secret*/*api-key*name as sensitive.
How we got here
- Show OAuth auth response bodies in Network tab, with sensitive-field masking + reveal toggle #1386 / feat(network): show auth response bodies with masked secrets + reveal toggle (#1386) #1387 (May 31) added display-time masking:
maskSecretsInBody(clients/web/src/utils/maskSecrets.ts) plus a Reveal toggle, on the stated premise that "the raw body is preserved by the caller and shown only when the user reveals it." - core: redact sensitive headers in the fetch log #1561 (headers) and core: redact sensitive fields in fetch-log request/response bodies + URL query strings #1593 (bodies + URL query) (July 1, ported from reference PR feat(web/apps): spec-conformant Apps host + CLI/deep-link path for programmatic review #1510) moved redaction to capture time in
createFetchTracker(core/mcp/fetchTracking.ts). The reason was that the recorded entry reaches the in-memory list, the logger and persisted session storage. Neither issue accounted for the Reveal toggle, so since then the "raw" body Reveal shows is already redacted. - Headers never got the mask/reveal treatment.
HeadersTableinNetworkEntry.tsxrenders values verbatim. Only the six headers core's list named were redacted (and so unrevealable); every other credential header passed through in plain text. - Five separate lists decide what a secret is, and they have drifted: the fetch tracker's header set and body-field set,
--oauth-debug'sSENSITIVE_FIELDS, the CLI'sisSensitiveHeader, and the web mask's JSON/form keys.
Fix
Mask for display and reveal on request in the live view; redact wherever data leaves memory.
- One list. A new
core/mcp/sensitiveNames.tsis the single source used by every masker and redactor. It has two predicates: exact match for protocol field names (sotoken_endpoint/token_typestay readable) and fragment match for header names, the CLI's rule plusDPoPandOcp-Apim-Subscription-Key, minusWWW-Authenticate, which is a challenge, not a credential. - Keep real values in the live fetch log.
createFetchTrackerstops redacting headers and bodies. It still redacts the URL query, since the URL shows in every collapsed row with no reveal control; still maskswhsec_webhook secrets (Events (#3026) phase 4: webhook subscription management #3031), which are found by value, not by name; and still withholds truncated JSON, which can't be masked. - Redact at the sinks with a new
redactFetchRequestEntry: theInspectorClientfetch log line, Network export, and the TUI's request details, which have no reveal control. - Mask/reveal for headers in
NetworkEntry, matching bodies. - Never offer Reveal over a value that is genuinely gone: a value already
[REDACTED]is not counted as a maskable secret. - Carry the pre-redirect OAuth Network log in browser
sessionStorageinstead of the backend's disk (/api/storage→~/.mcp-inspector/storage). The entries are needed only across the one full-page OAuth redirect, in the same tab.sessionStorageis scoped to the tab and origin, never leaves the browser, already holds the backend API token (a strictly stronger credential), and the entry is deleted as soon as it is restored. Today's disk copy is never deleted.
Activity
cliffhall commentedon Nov 30, 2026
Priority: High (total 10), carried over from #3023's re-score with #3076 folded in.
buglabel, +1 security-related (secret exposure), +1 milestone (v2.18.0)fix: resolve sessionStorage lazily; cache TUI redaction per entry (#3077
fix(core): mask JSON-escaped webhook secrets at capture (#3077)
fix(core): withhold a body too deeply nested to scan at capture (#3077)
fix(web): never show raw JSON that names a sensitive key with nothing…
Merge pull request #3078 from modelcontextprotocol/v2/fix/3077-reveal…
cliffhall commentedon Nov 30, 2026
Shipped in #3078 (merged into v2/main as b1cad2e).