GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: prevent custom credential headers from following cross-origin HTTP redirects · Issue #5744 · developing-today/code

mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744

New issue
Copy link
New issue
Copy link
Closed
Closed
mcpx: prevent custom credential headers from following cross-origin HTTP redirects#5744
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 5, 2026
Issue body actions

Problem

The HTTP client in pkgs/mcpx/internal/mcpclient/http.go applies configured custom headers to upstream requests, but its http.Client uses Go's default redirect policy (around lines 75–83 and request header construction around lines 152–155). Go strips selected standard sensitive headers on some cross-origin redirects, but it does not know that arbitrary configured headers such as X-API-Key contain credentials. A malicious or compromised upstream can return a redirect to another origin and receive the configured secret header.

This affects any MCP server/provider configured with a custom credential header and does not require the destination origin to be trusted.

Required behavior

Do not forward configured secret/custom credential headers across an origin boundary. Prefer refusing cross-origin redirects; if same-origin redirects remain supported, compare normalized scheme/host/port and retain credentials only when the origin is identical. The redirect policy must cover every request through this HTTP transport.

Acceptance criteria

  • An httptest upstream returns a redirect to a second server; configure a custom X-API-Key header and assert the second server never receives it.
  • The selected behavior for the redirect is explicit and deterministic (reject it or return the 3xx without following).
  • Same-origin redirect behavior is covered if it remains supported.
  • Existing bearer/auth header behavior and normal HTTP MCP calls remain covered by targeted tests.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/highImportant and time-sensitive
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Contributor
    More actions

    CODE-1432

  3. github-actions
    assigned
    dezren39
    on Nov 5, 2026
  4. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 5, 2026
  5. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-m
    • Session / ID: task 10154
    • Found via: queue claim
    • Task: Triage issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 (mcpx custom credential headers following cross-origin redirects) at current main: verify the vulnerable code path, check for existing owners/PRs, scope the fix path, and route it.
    • Expectation: triage (s) — done looks like findings posted on issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 with a scoped fix route (follow-up fix task enqueued if the fix is not already owned) and task 10154 completed as triaged.
    • Links: task 10154 · issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-m
    • Session / ID: task 10154
    • Found via: queue claim
    • Task: Triage of issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 complete — CONFIRMED at current main c26e0585add36770e90d7b24480b9bb5b3564c5e, fix path scoped and routed to task 10645.
    • Expectation: triage done; the fix itself is task 10645 (small_fix, queued).

    Triage findings (fresh verification, 2026-11-05)

    • pkgs/mcpx/internal/mcpclient/http.go line 82: newHTTPClients returns &http.Client{Timeout: timeout, Transport: clone()} and &http.Client{Transport: clone()} — neither sets CheckRedirect, so Go's default redirect policy applies. A grep for CheckRedirect across pkgs/mcpx returns nothing.
    • setHeadersFor (lines 152–155) applies every configured custom header (HTTPOptions.Headers, lines 60/97) to each outgoing request. Go's default redirect handling copies such custom headers to cross-origin redirect targets — it strips only the Authorization / Www-Authenticate / Cookie class — so a malicious or compromised upstream can 3xx to another origin and receive a configured credential header such as X-API-Key. The bug in issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 is real and live on main.
    • Scope for the fix (task 10645): the two clients from newHTTPClients plus an audit of the package-level streamClient (line 488, used by listen()) — every client that can carry configured headers gets the same policy: refuse cross-origin redirects (normalized scheme/host/port comparison; explicit error or ErrUseLastResponse), same-origin redirects may still be followed.
    • No competing owner: no open PR references issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 or the mcpx redirect work; no hard-stop labels on issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744.
    • Cross-repo: mcpx also appears in dezren39/darwin-nix as a consumer/configuration — task 10645 instructs the fixer to confirm there is no vendored mcpclient copy there and, if one exists, to port the identical policy in the same set under issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 rather than filing a separate issue.
    • Tests are specified in task 10645 per the acceptance criteria on issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 (httptest cross-origin redirect never delivers the configured X-API-Key; explicit cross-origin behavior; same-origin covered if supported; existing auth/header tests stay green).

    Task 10154 completes as triaged; follow-up: task 10645.

  7. dezren39
    added
    queue/queuedHas a queued queue task
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  8. 177 remaining items

    Load more actions
  9. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    MemberAuthor
    More actions

    🤖 Agent note · bound

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 10645; monitor run 2026-11-07 02:12 CST
    • Found via: monitor reconciliation (Duty 1B PR↔queue binding)
    • Task: PR fix(mcpx): refuse cross-origin credential redirects #6560 implements this issue (verified this run: open, head branch names task 10645 and this issue, diff touches the expected files). Pickup happened via a queue lane (fleet-convention branch queue/10645-…). Task 10645 currently sits QUEUED — its claim evaporated after the PR opened, and the monitor could not re-claim/park it this run because the queue claim path is lane-based and lane ids are being rejected fleet-wide today (see sweep log lane STOPs). The next holder of task 10645 must shepherd PR fix(mcpx): refuse cross-origin credential redirects #6560 — review CI and merge when green — and must NOT re-implement this issue.
    • Expectation: PR fix(mcpx): refuse cross-origin credential redirects #6560 merged or explicitly dispositioned; no duplicate implementation.
    • Links: PR fix(mcpx): refuse cross-origin credential redirects #6560
  10. dezren39
    added
    queue/queuedHas a queued queue task
    status/needs-triageNot yet triaged; needs a first look
    and removed
    work/assignedQueue worker lifecycle state
    on Nov 7, 2026
  11. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 10645 · repo-fleet-monitor run 2026-11-07 08:12 CST
    • Found via: monitor reconciliation
    • Task: Claim evaporated — task 10645 in repo-health-code-pilot is queued and unclaimed (no live lease, verified this run), while this issue still carried claimed labels. Labels reset to the truth: queue/queued + status/needs-triage. Checkpoint stage on the task: handed_off.
    • Expectation: The next claimant of task 10645 picks this up from the queued state; do not treat any earlier claim as live.
    • Links: n/a
  12. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code, lane code-l)
    • Session / ID: task 10645
    • Found via: queue claim
    • Task: Triage issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 — assigned_lane=opencode; handed off to the opencode claimant, which launches the bound session.
    • Expectation: claimant session drives task 10645 to its terminal state.
    • Links: issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744
  13. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · triaged

    • Agent: queue worker (repo-worker-code), lane code-a
    • Session / ID: task 13106
    • Found via: queue claim (execution lane: direct; claim row verified stamped code-a)
    • Task: Triage issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 — mcpx: prevent custom credential headers from following cross-origin HTTP redirects
    • Verdict: CONFIRMED, real and current — and the fix is already built and routed. No new fix packet enqueued (dedupe).
    • Fresh evidence (2026-11-08): Issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 OPEN (kind/bug, priority/high, no hard-stop labels). Laptop main 2d01502: pkgs/mcpx/internal/mcpclient/http.go newHTTPClients builds both http.Clients with NO CheckRedirect (grep finds no CheckRedirect in the file), and setHeaders applies the configured custom headers (t.headers) to the request — Go's default redirect handling copies non-standard credential headers (e.g. X-API-Key) cross-origin. PR fix(mcpx): refuse cross-origin credential redirects #6560 is OPEN, non-draft, on branch queue/10645-5744-redirect-origin-policy: it refuses cross-origin redirects (http.ErrUseLastResponse) across Streamable HTTP and legacy SSE, with httptest regressions. The PR's Codex review state (comment 6689717716) shows undispositioned findings at 9d77791 — those gate its merge under the 2026-10-29 Codex gate.
    • Routing: The owning fix task already exists and is queued: task 10645 (dedupe hit on repo-health:v1:fix:developing-today/code:issue:5744 when this triage attempted the enqueue). Its remaining work: disposition PR fix(mcpx): refuse cross-origin credential redirects #6560's Codex findings, rebase/verify, and merge. Task 13106 completes as triaged.
    • Links: task 13106, task 10645, issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744, PR fix(mcpx): refuse cross-origin credential redirects #6560
  14. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    🤖 Agent note · done — Agent: repo queue worker, lane code-b (repo-worker-code). Task: task 13305 (pr_shepherd) for PR #6560. PR #6560 MERGED (squash d58527f): refuseCrossOriginRedirect in pkgs/mcpx/internal/mcpclient covers every request through this transport; redirect_test.go covers the cross-origin credential-header case, explicit refusal, and same-origin behavior per the acceptance criteria above. Codex P2 findings on the head were fixed in 2c39583 and dispositioned (replies 4506551297, 4506551522). Verified this shift on the laptop at head acdab19: go test ./internal/mcpclient/ PASS (12.6s). Basic CI checks remained QUEUED (fleet runner stall); merged under standing merge authority with targeted tests verified. Closing #5744 on this evidence.

  15. dezren39
    closed this as completedon Nov 8, 2026
  16. developing-today
    added
    status:done
    on Nov 8, 2026
  17. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued queue task
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 9, 2026
  18. dezren39 commented on Nov 9, 2026

    @dezren39
    dezren39
    on Nov 9, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already_done)

    • Agent: repo queue worker, lane code-g (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-g run 2026-11-09 05:43 CST; task 10645
    • Found via: queue claim · task 10645
    • Task: task 10645 for issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 (small_fix). Fresh check: issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 is CLOSED (COMPLETED, 2026-11-08T22:11:55Z); PR fix(mcpx): refuse cross-origin credential redirects #6560 MERGED 2026-11-08T22:11:02Z, squash d58527f, by task 13305 (pr_shepherd, lane code-b), which dispositioned the Codex findings and verified go test ./internal/mcpclient/ PASS on the laptop. Task 10645 completes as already_done; no competing work created. Stale labels status/parked, status/needs-triage, queue/parked, queue/queued removed by this lane at completion.
    • Links: task 10645 · issue mcpx: prevent custom credential headers from following cross-origin HTTP redirects #5744 · PR fix(mcpx): refuse cross-origin credential redirects #6560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.