Python
CVE-2026-34237
MEDIUM
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Primary rating from Vendor (https://github.com/modelcontextprotocol/java-sdk) · only source for this CVE.
CVSS VectorVendor: https://github.com/modelcontextprotocol/java-sdk
Lifecycle Timeline
3Blast Radius
ecosystem impact- 38 maven packages depend on io.modelcontextprotocol.sdk:mcp-core (13 direct, 25 indirect)
Ecosystem-wide dependent count for version 1.0.0.
DescriptionCVE.org
Summary
Hardcoded Wildcard CORS (Access-Control-Allow-Origin: * )
- https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/server/transport/HttpServletSseServerTransportProvider.java#L289
- https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/server/transport/HttpServletStreamableServerTransportProvider.java#L525
Attack Scenario
An attacker-controlled web page instructs the victim's browser to open GET https://internal-mcp-server/sse. Because Access-Control-Allow-Origin: * allows cross-origin SSE reads, the attacker's page receives the endpoint event - which contains the session ID. The attacker can then POST to that endpoint from their page using the victim's browser as a relay.
Comparison with python-sdk
No Access-Control-Allow-Origin header is emitted by either Python transport. The browser's default same-origin policy remains in full effect. https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/sse.py https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/streamable_http.py
Recommendation
In the SDK, the transport layer should not own CORS policy. Server implementors who need cross-origin access can add a CORS filter at the servlet filter or Spring Security layer.
Resources
- https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#access-control-allow-origin
AnalysisAI
Hardcoded wildcard CORS headers (Access-Control-Allow-Origin: *) in the Model Context Protocol Java SDK transport layer enable cross-origin session hijacking, allowing attackers to extract session IDs from victim browsers and relay authenticated requests back to internal MCP servers. The vulnerability affects the HttpServletSseServerTransportProvider and HttpServletStreamableServerTransportProvider classes in mcp-core; no public exploit code has been identified, though the attack requires user interaction (victim visiting attacker-controlled page). CVSS 6.1 reflects the combination of network-accessible vector, low attack complexity, and cross-origin impact, though practical exploitation depends on MCP server deployment architecture.
Technical ContextAI
The Model Context Protocol Java SDK implements two HTTP-based server transports for streaming operations: Server-Sent Events (SSE) and a streamable HTTP transport. Both transport providers unconditionally emit Access-Control-Allow-Origin: * response headers, which tells victim browsers that cross-origin JavaScript from any domain may read the response body and headers. Server-Sent Events (SSE) is a unidirectional streaming protocol where the server pushes data to connected clients; the MCP protocol uses SSE endpoints to transmit session initialization data including session IDs. Affected products are identified by Maven coordinates io.modelcontextprotocol.sdk:mcp-core. The root cause is classified as CWE-942 (Permissive Cross-domain Policy), a category that captures overly permissive CORS configurations that violate the browser's same-origin security policy. The Python SDK does not exhibit this flaw because its SSE and HTTP transport implementations do not emit CORS headers at all, relying on browser default same-origin enforcement.
RemediationAI
Patch the Java SDK by removing hardcoded Access-Control-Allow-Origin: * headers from the HttpServletSseServerTransportProvider and HttpServletStreamableServerTransportProvider classes. Implementors should delegate CORS policy to the servlet container or framework layer (e.g., Spring Security, servlet filters) rather than the transport SDK. If a patched version of mcp-core is released, upgrade to that version immediately. As a temporary workaround, server implementors can add a servlet filter or Spring Security configuration that strips or overrides the CORS headers emitted by the transport layer, enforcing the restrictive same-origin policy by default. For deployments requiring genuine cross-origin access, explicitly configure a CORS filter with a allowlist of trusted origins rather than wildcard patterns. Consult the OWASP HTTP Headers Cheat Sheet (https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#access-control-allow-origin) for correct CORS implementation guidance.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-hv2w-8mjj-jw22