GHSA-6529-c226-h328: SSRF

Published Sep 22, 2026
·
Updated

Summary

makessrfsafehook() blocks HTTP redirects to private/internal IPs by validating the Location header before the client follows a 3xx response. The problem is that this hook is only attached in one of three authentication branches — the header-PAT path. Basic auth and OAuth branches skip it entirely, so if the connected Atlassian server returns a redirect to something like http://169.254.169.254/, the requests session follows it without complaint.

This is an incomplete fix for GHSA-7r34-79r5-rcc9. The hook works fine when it's there — it just isn't there for most production auth configurations.

Details

In src/mcpatlassian/servers/dependencies.py, three branches construct a fetcher and call createandvalidate(). Only Branch 1 passes attachssrfhook=True:

python Branch 1 (header PAT) — hook attached return createandvalidate(request, spec, headerconfig, "headerpat", attachssrfhook=True)

Branch 2 (basic auth) — hook missing return createandvalidate(request, spec, userconfig, "basic", useremail=useremail)

Branch 3 (OAuth/PAT) — hook missing return createandvalidate(request, spec, userconfig, "oauthpat", useremail=useremail)

attachssrfhook defaults to False, so branches 2 and 3 silently skip the protection. The hook itself (makessrfsafehook) is straightforward — it checks response.isredirect, grabs the Location header, and calls validateurlforssrf() to reject private IPs. It works correctly when present.

Typical attack flow:

1. Attacker controls or compromises an Atlassian instance (Cloud or Server) 2. MCP server connects using basic auth or OAuth credentials (most production setups) 3. Atlassian returns 302 Location: http://169.254.169.254/latest/meta-data/iam/security-credentials/ 4. The unprotected session follows the redirect 5. AWS IAM credentials (or other internal service data) are returned to the attacker

PoC

Tested on commit d8bc786 (v0.21.1). No real credentials needed.

python from unittest.mock import MagicMock import requests

from mcpatlassian.servers.dependencies import makessrfsafehook from mcpatlassian.utils.urls import validateurlforssrf from mcpatlassian.jira import JiraFetcher from mcpatlassian.jira.config import JiraConfig

config = JiraConfig( url="https://attacker.atlassian.net", authtype="basic", username="victim@example.com", apitoken="victim-token", ) fetcher = JiraFetcher(config=config) session = fetcher.jira.session

hooks = session.hooks.get("response", []) print("hooks on basic-auth session:", [h.name for h in hooks] or "none")

fakeredirect = MagicMock(spec=requests.Response) fakeredirect.isredirect = True fakeredirect.headers = {"Location": "http://169.254.169.254/latest/meta-data/"}

blocked = False for h in hooks: try: h(fakeredirect) except ValueError as e: blocked = True print("blocked:", e)

if not blocked: print("redirect to 169.254.169.254 not blocked on basic-auth session")

show header-PAT branch does block it hook = makessrfsafehook(validateurlforssrf) try: hook(fakeredirect) except ValueError as e: print("header-PAT branch blocks:", e)

Output:

<img width="2490" height="214" alt="image" src="https://github.com/user-attachments/assets/c7d9d7e2-4c37-4abd-95a3-4ddd9f6bd735" />

$ uv run python3 /tmp/test.py hooks on basic-auth session: none redirect to 169.254.169.254 not blocked on basic-auth session header-PAT branch blocks: Redirect blocked (SSRF): Blocked IP address: 169.254.169.254 (non-global)

Impact

Basic auth and OAuth cover most production Atlassian Cloud deployments, so this affects the majority of HTTP-mode multi-user setups. An attacker with control over the Atlassian server can redirect MCP server requests to internal infrastructure — cloud metadata endpoints, internal Kubernetes API, databases, or any service reachable from the MCP server's network.

The fix is one line per affected branch: pass attachssrfhook=True to createandvalidate() in branches 2 and 3, the same way branch 1 already does.

Affected Software

1 affected componentFixes available
pip/mcp-atlassian<0.22.0
0.22.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/mcp-atlassian to a version that resolves this vulnerability.

    Fixed in 0.22.0
  2. Configuration

    Pass attach_ssrf_hook=True to _create_and_validate() in the basic-auth and oauth_pat branches in src/mcp_atlassian/servers/dependencies.py, matching the existing header-PAT branch, so redirects to private or internal IPs are rejected.

    MCP Atlassian JiraFetcher authentication branches attach_ssrf_hook = True

Event History

Sep 22, 2026
Advisory Published
via GitHub·08:35 PM
Data Sourced
via GitHub·08:35 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which authentication configurations are affected?

Basic authentication and OAuth/PAT configurations are affected because they create fetchers without the SSRF redirect-validation hook. The header-PAT path attaches the hook and is not affected by this specific omission.

2

What must an attacker be able to do to exploit this?

The connected Atlassian server must return a 3xx redirect whose Location points to a private or internal address, such as 169.254.169.254. Exploitation also requires use of an affected basic-auth or OAuth/PAT configuration.

3

How can I determine whether my deployment is exposed?

Review the authentication branch used by the mcp-atlassian connection. Deployments using basic auth or OAuth/PAT should be treated as exposed to redirects to internal addresses; deployments using the header-PAT branch have the redirect-validation hook attached.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203