In this article
Observe both redirect origins with fake credentials; rejecting a cross-origin MCP redirect must prevent forwarding, while supported same-origin behavior remains usable.
Qwen Code v0.27.4, released on November 15 at 07:04:40 UTC, includes an MCP SDK security upgrade with redirect regression coverage. The checked implementation distinguishes cross-origin refusal from ordinary same-origin behavior and retains the stricter Agent Plugin redirect policy. The useful acceptance boundary is the destination’s received request: a local error alone cannot prove that synthetic credentials and initialization content were never forwarded first.
The receiver provides the decisive evidence
Run two owned loopback HTTP origins and make the first return a controlled redirect during MCP initialization. Add a unique fake custom credential and inert request marker. Inspect the second origin’s entire request log after the client reports its outcome. The destination should receive neither the credential nor the initialization body in the refused cross-origin case. Clearing logs only after the error would destroy exactly the evidence needed to detect forwarding before refusal.
A changed port is still another origin
Use clearly documented origin tuples in the fixture, including scheme, host and port. A redirect between two local ports can be cross-origin even when both resolve to the same machine. Do not infer safety from an equal hostname label in a dashboard. Include the supported same-origin control and observe a normal initialization afterward, distinguishing a correct boundary from an adapter that disables every redirect or breaks transport altogether.
Consumer installation determines the actual transport
Inspect the MCP SDK resolved by the packed application consumer, not only the repository’s development workspace. The release raises direct minimums because root overrides are not inherited downstream. Run the owned redirect fixture using that installed artifact. A fixed source lock establishes maintainer intent, while a retained consumer lock may still load an older transport. Preserve the loaded module path and version together with the destination logs for a reviewable result.
Product-specific redirect rules remain separate
Exercise the application’s credentialed Agent Plugin path separately from ordinary MCP transport and retain its documented stricter policy. A library-level controlled reproduction does not establish every product configuration is exploitable. This delivered repair gives a concrete boundary to verify. A useful adoption record joins actual installed transport, origin identity, no-forward destination evidence and a useful same-origin control, without relying on a broad statement that all redirects or all external tool connections are equivalent.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.