GO-2026-6911

Source
https://pkg.go.dev/vuln/GO-2026-6911
Import Source
https://vuln.go.dev/ID/GO-2026-6911.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2026-6911
Downstream
CGA (116)
DHI (1)
Published
2026-11-05T22:55:15Z
Modified
2026-11-23T20:30:11Z
Summary
SSRF and credential leak via unvalidated redirects and SSE endpoint origin in github.com/mark3labs/mcp-go
Details

In github.com/mark3labs/mcp-go/client/transport, NewStreamableHTTP, NewSSE, and NewOAuthHandler construct default http.Client instances with a nil CheckRedirect policy when no custom HTTP client (WithHTTPBasicClient, WithHTTPClient, or OAuthConfig.HTTPClient) is supplied. Additionally, SSE.handleSSEEvent validates the server-supplied endpoint event URL only against the connection's host, without verifying the scheme or port.

When an MCP or OAuth server responds with a 3xx redirect, net/http follows up to 10 http or https redirects to arbitrary origins:

  • Custom headers configured via WithHTTPHeaders, WithHTTPHeaderFunc, WithHeaders, or WithHeaderFunc are copied onto requests to any redirect host.
  • The Authorization header (including OAuth bearer tokens) is preserved when redirecting to the same host or a subdomain, including across port changes or https-to-http scheme downgrades.
  • On 307 and 308 redirects, the request body is resent to the redirect target, exposing JSON-RPC payloads on transport requests and form bodies containing client_secret, authorization codes, or refresh tokens on OAuth token, refresh, and client registration requests.

This enables server-side request forgery (SSRF) and credential or payload disclosure.

Database specific
{
    "review_status":  "REVIEWED",
    "url":  "https://pkg.go.dev/vuln/GO-2026-6911"
}
References
Credits
    • Dennis (denniszag)
    • Muhammad Hamizi Jaminan (hymns)

Affected packages

Go / github.com/mark3labs/mcp-go

Package

Name
github.com/mark3labs/mcp-go
View open source insights on deps.dev
Purl
pkg:golang/github.com/mark3labs/mcp-go

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.5.1-0.20261109144041-2f5b9637ea84

Ecosystem specific

{
    "imports":  [
        {
            "path":  "github.com/mark3labs/mcp-go/client/transport",
            "symbols":  [
                "NewOAuthHandler",
                "NewSSE",
                "NewStreamableHTTP",
                "OAuthHandler.ProcessAuthorizationResponse",
                "OAuthHandler.RefreshToken",
                "OAuthHandler.RegisterClient",
                "SSE.SendNotification",
                "SSE.SendRequest",
                "SSE.Start",
                "SSE.handleSSEEvent",
                "StreamableHTTP.SendNotification",
                "StreamableHTTP.SendRequest"
            ]
        }
    ]
}

Database specific

source
"https://vuln.go.dev/ID/GO-2026-6911.json"