Skip to content

fix: block redirect header leaks#936

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix/redirect-header-leak
Open

fix: block redirect header leaks#936
DaleSeo wants to merge 1 commit into
mainfrom
fix/redirect-header-leak

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Jun 27, 2026

Copy link
Copy Markdown
Member

Motivation and Context

This fixes a security issue where the default reqwest-backed streamable HTTP transport could follow redirects while preserving caller-provided custom headers. Disabling automatic redirects keeps secrets such as custom API key headers scoped to the intended MCP server instead of replaying them to an attacker-controlled redirect target.

How Has This Been Tested?

Added a regression test

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@github-actions github-actions Bot added T-core Core library changes T-transport Transport layer changes labels Jun 27, 2026
@DaleSeo DaleSeo marked this pull request as ready for review June 27, 2026 03:51
@DaleSeo DaleSeo requested a review from a team as a code owner June 27, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant