GHSA-hv2w-8mjj-jw22

Suggest an improvement
Source
https://github.com/advisories/GHSA-hv2w-8mjj-jw22
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-hv2w-8mjj-jw22/GHSA-hv2w-8mjj-jw22.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hv2w-8mjj-jw22
Aliases
Downstream
CGA (8)
Published
2026-03-30T17:26:44Z
Modified
2026-09-10T03:50:39Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
MCP Java SDK has a Hardcoded Wildcard CORS (Access-Control-Allow-Origin: *)
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-942"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-03-30T17:26:44Z",
    "nvd_published_at":  "2026-03-31T16:16:32Z",
    "severity":  "MODERATE"
}
References

Affected packages

Maven
io.modelcontextprotocol.sdk:mcp-core

Package

Name
io.modelcontextprotocol.sdk:mcp-core
View open source insights on deps.dev
Purl
pkg:maven/io.modelcontextprotocol.sdk/mcp-core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.0.0
Fixed
1.0.1

Affected versions

1.*
1.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-hv2w-8mjj-jw22/GHSA-hv2w-8mjj-jw22.json"
io.modelcontextprotocol.sdk:mcp-core

Package

Name
io.modelcontextprotocol.sdk:mcp-core
View open source insights on deps.dev
Purl
pkg:maven/io.modelcontextprotocol.sdk/mcp-core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.1.0
Fixed
1.1.1

Affected versions

1.*
1.1.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-hv2w-8mjj-jw22/GHSA-hv2w-8mjj-jw22.json"
io.modelcontextprotocol.sdk:mcp-core

Package

Name
io.modelcontextprotocol.sdk:mcp-core
View open source insights on deps.dev
Purl
pkg:maven/io.modelcontextprotocol.sdk/mcp-core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.18.3

Affected versions

0.*
0.13.0
0.13.1
0.14.0
0.14.1
0.15.0
0.16.0
0.17.0
0.17.1
0.17.2
0.18.0
0.18.1
0.18.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-hv2w-8mjj-jw22/GHSA-hv2w-8mjj-jw22.json"