The vulnerability is a Server-Side Request Forgery (SSRF) that originates in the ASGI middleware layer of the mcp-atlassian server. The root cause is the lack of input validation on the X-Atlassian-Jira-Url and X-Atlassian-Confluence-Url HTTP headers when no Authorization header is present.
The exploitation flow is as follows:
- An unauthenticated attacker sends a request to the
/mcp endpoint with a malicious URL in the X-Atlassian-Jira-Url or X-Atlassian-Confluence-Url header.
- The
McpAtlassianMiddleware._process_authentication_headers function in src/mcp_atlassian/servers/main.py reads this header and, prior to the patch, stored the unvalidated URL in the request's state.
- When a tool function is called, the dependency injection system invokes either
get_jira_fetcher or get_confluence_fetcher from src/mcp_atlassian/servers/dependencies.py.
- These functions retrieve the malicious URL from the state, instantiate a
JiraFetcher or ConfluenceFetcher object with it, and immediately make an HTTP request to that URL to verify the user's identity (e.g., by calling get_current_user_account_id()).
- This outbound request from the server to the attacker-controlled URL constitutes the SSRF, which can be used to scan internal networks, steal cloud instance metadata credentials, or inject malicious content into LLM agent sessions.
The patch mitigates this by adding a validate_url_for_ssrf function that is called within _process_authentication_headers to block malicious URLs before they are ever used. A secondary defense was also added to the fetcher functions to block SSRF via HTTP redirects.