Medium

MCP Java SDK has a Hardcoded Wildcard CORS (Access-Control-Allow-Origin: *)

  • Disclosed: 30.03.2026
  • Updated: 11.10.2026 13:20

Summary

Hardcoded Wildcard CORS (Access-Control-Allow-Origin: * )

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.

Reference

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) io.modelcontextprotocol.sdk:mcp-core >= 1.0.0, < 1.0.1, >= 1.1.0, < 1.1.1, < 0.18.3 1.0.1, 1.1.1, 0.18.3

References

CVSS score 6.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-942
Platform
Java / Kotlin (Maven)
Package
io.modelcontextprotocol.sdk:mcp-core
Disclosed
30.03.2026
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-hv2w-8mjj-jw22 - CC BY 4.0

Vulnerability history: io.modelcontextprotocol.sdk:mcp-core

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
03.2026 04.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 1

Disclosures per year

  1. 2026: 2
  1. High CVE-2026-35568 < 1.0.0 1.0.0
  2. MCP Java SDK has a Hardcoded Wildcard CORS (Access-Control-Allow-Origin: *) this entry
    Medium · 6.1 CVE-2026-34237 >= 1.0.0, < 1.0.1, >= 1.1.0, < 1.1.1, < 0.18.3 1.0.1, 1.1.1, 0.18.3

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.