CVE-2026-34237
Received Received - Intake
Hardcoded Wildcard CORS Vulnerability in MCP Java SDK

Publication date: 2026-03-31

Last updated on: 2026-04-03

Assigner: GitHub, Inc.

Description
MCP Java SDK is the official Java SDK for Model Context Protocol servers and clients. Prior to versions 1.0.1 and 1.1.1, there is a hardcoded wildcard CORS vulnerability. This issue has been patched in versions 1.0.1 and 1.1.1.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-31
Last Modified
2026-04-03
Generated
2026-05-07
AI Q&A
2026-03-31
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
lfprojects mcp_java_sdk to 1.0.1 (exc)
lfprojects mcp_java_sdk 1.1.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-942 The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate.
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability involves a hardcoded wildcard CORS policy allowing any origin to access Server-Sent Events (SSE) endpoints, which can lead to unauthorized access to sensitive data such as session IDs. This exposure of sensitive information could potentially violate data protection requirements under regulations like GDPR and HIPAA, which mandate strict controls over personal and sensitive data to prevent unauthorized access and data breaches.

Because the vulnerability permits cross-origin requests from untrusted domains, it increases the risk of unauthorized data disclosure and session hijacking, undermining confidentiality and integrity protections required by these standards.

The recommended mitigation is to remove CORS enforcement from the SDK transport layer and instead apply CORS policies at the server implementation level, aligning with best practices to maintain compliance with security standards.


Can you explain this vulnerability to me?

CVE-2026-34237 is a vulnerability in the MCP Java SDK versions prior to 1.0.1 and 1.1.1 caused by a hardcoded wildcard Cross-Origin Resource Sharing (CORS) policy. Specifically, the SDK transport layer sets the HTTP header Access-Control-Allow-Origin to *, allowing any web origin to access the MCP server endpoints.

This means that an attacker-controlled web page can perform cross-origin Server-Sent Events (SSE) GET requests to internal MCP server endpoints and receive sensitive data such as session IDs. The attacker can then use the victim's browser to send POST requests to the MCP server, potentially exploiting the victim's session.

The vulnerability arises from permissive cross-domain security policies that allow untrusted domains to access sensitive MCP server resources, classified as CWE-942.


How can this vulnerability impact me? :

This vulnerability can lead to unauthorized access and manipulation of MCP server sessions by attackers. Because the wildcard CORS policy allows any origin to access the server, an attacker can craft a malicious web page that interacts with the MCP server through the victim's browser.

The attacker can receive sensitive information such as session IDs via Server-Sent Events and use the victim's browser to send POST requests to the MCP server, potentially hijacking or manipulating the victim's session.

The impact includes limited confidentiality and integrity loss, as indicated by the CVSS score, but no availability impact.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for the presence of the hardcoded wildcard CORS header `Access-Control-Allow-Origin: *` in the HTTP responses from the MCP Java SDK server endpoints, especially the SSE endpoint (commonly `/sse`).

You can use network inspection tools or command-line utilities to observe HTTP headers returned by the server. For example, using curl to inspect the headers of the SSE endpoint:

  • curl -i -N https://your-mcp-server/sse

Look for the `Access-Control-Allow-Origin: *` header in the response. Its presence indicates the vulnerable configuration.

Alternatively, you can use browser developer tools to inspect the network requests to the MCP server's SSE endpoint and check the CORS headers.


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation is to upgrade the MCP Java SDK to versions 1.0.1 or 1.1.1 or later, where the hardcoded wildcard CORS vulnerability has been patched.

If upgrading is not immediately possible, remove or disable the CORS policy enforcement in the SDK transport layer to avoid sending the wildcard `Access-Control-Allow-Origin: *` header.

Instead, implement CORS filtering at the servlet filter or Spring Security layers on the server side, applying strict and appropriate CORS policies according to your security requirements.

This approach aligns with best practices recommended by OWASP and prevents unauthorized cross-origin access.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart