Model Context Protocol TypeScript SDK обеспечивает TypeScript клиентскую и серверную реализацию Model Context Protocol. До 1.32.0 в modelcontextprotocol/sdk и от 2.0.0 до 2.3.0 в modelcontextprotocol/client клиентские запросы HTTP и OAuth следовали перенаправлениям в другое происхождение, сохраняя пользовательские заголовки запросов, а для ответов HTTP 307 или 308 — тела запросов. Пораженными поверхностями являются клиентские функции StreamableHTTPClientTransport, SSEClientTransport и OAuth, такие как auth().
Триггер - это перенаправление HTTP на другой источник. Пользовательские заголовки и mcp-session-id могут быть повторно отправлены на перенаправленный источник. Переадресации HTTP 307 и 308 также могут повторно отправлять тело запроса.
Тела запросов OAuth могут содержать значения refresh_token и client_secret. Текущие среды выполнения уже снимают заголовок Authorization через origins. stdio клиенты не используют затронутый путь HTTP. Таким образом, вредоносный или скомпрометированный MCP или сервер авторизации может получать ключи API, идентификаторы сеансов, токены обновления OAuth или клиентские секреты OAuth.
Восстановление неограниченного перенаправления после обновления восстанавливает экспозицию. This issue is fixed in @modelcontextprotocol/sdk 1.32.0 and @modelcontextprotocol/client 2.3.0.
Показать оригинальное описание (EN)
The Model Context Protocol TypeScript SDK provides TypeScript client and server implementations of the Model Context Protocol. Prior to 1.32.0 in @modelcontextprotocol/sdk and from 2.0.0 until 2.3.0 in @modelcontextprotocol/client, the HTTP client transports and OAuth client requests followed redirects to a different origin while retaining custom request headers and, for HTTP 307 or 308 responses, request bodies. The affected surfaces are StreamableHTTPClientTransport, SSEClientTransport, and OAuth client functions such as auth(). The trigger is an HTTP redirect to another origin. Custom headers and mcp-session-id can be re-sent to the redirected origin. HTTP 307 and 308 redirects can also re-send the request body. OAuth request bodies can contain refresh_token and client_secret values. Current runtimes already strip the Authorization header across origins. stdio clients do not use the affected HTTP path. A malicious or compromised MCP or authorization server could therefore receive API keys, session identifiers, OAuth refresh tokens, or OAuth client secrets. Restoring unrestricted redirect following after upgrading restores the exposure. This issue is fixed in @modelcontextprotocol/sdk 1.32.0 and @modelcontextprotocol/client 2.3.0.
Характеристики атаки
Последствия
Строка CVSS v3.1