CVE-2026-77261: MCP Atlassian: SSRF redirect protection missing for basic-auth and OAuth authentication branches
In mcp-atlassian before 0.22.0, the redirect SSRF guard is attached only for header-PAT authentication. Sessions using basic auth or OAuth follow redirects to private addresses such as the cloud metadata endpoint. Upgrade to 0.22.0.
Published Sep 22, 2026 · Analysis Oct 22, 2026
What an attacker can do
_make_ssrf_safe_hook() checks each 3xx response and rejects a Location pointing at a private IP through validate_url_for_ssrf(). In servers/dependencies.py, three branches build a fetcher through _create_and_validate(). Only the header-PAT branch passes attach_ssrf_hook=True. The default is False, so the basic and oauth_pat branches run without the hook. This is an incomplete fix of GHSA-7r34-79r5-rcc9.
The reporter's check on v0.21.1 showed no hooks on a basic-auth session, while the header-PAT hook raised "Redirect blocked (SSRF): Blocked IP address: 169.254.169.254 (non-global)".
To exploit it, the attacker must control or compromise the Atlassian server the MCP server connects to. That server answers a request with a 302 whose Location points at the metadata path for IAM security credentials on 169.254.169.254, and the session follows it. The attacker can then reach cloud metadata, an internal Kubernetes API, databases or other services reachable from the MCP host. Basic auth and OAuth cover most production Cloud setups, so most HTTP-mode multi-user deployments are in scope. The CVSS vector rates attack complexity high for this reason.
Who is affected
mcp-atlassian below 0.22.0 where Jira or Confluence connections use basic auth or OAuth. Header-PAT connections already had the hook. Highest risk is HTTP-mode multi-user servers that run in cloud networks where metadata endpoints are reachable.
pip show mcp-atlassianmcp-atlassian
- Ecosystem
- PyPI
- Affected
- < 0.22.0
- Fixed in
- 0.22.0
- Check
pip show mcp-atlassian
How to fix it
Upgrade to 0.22.0:
pip install --upgrade mcp-atlassian==0.22.0The reporter notes the underlying change is one line per branch: pass attach_ssrf_hook=True to _create_and_validate() in branches 2 and 3. The advisory gives no other workaround. As defense in depth, enforce IMDSv2 and block egress from the MCP host to internal ranges.
How to tell if you were hit
On the MCP host, check egress and proxy logs for requests to 169.254.169.254 or internal ranges that originate from the mcp-atlassian process. A 3xx response from an Atlassian URL followed by a request to a private address is the signature. On AWS, review CloudTrail for use of the instance role from unexpected addresses. Beam is not relevant to this flaw.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
_make_ssrf_safe_hook() 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/mcp_atlassian/servers/dependencies.py, three branches construct a fetcher and call _create_and_validate(). Only Branch 1 passes attach_ssrf_hook=True:
# Branch 1 (header PAT) — hook attached
return _create_and_validate(request, spec, header_config, "header_pat",
attach_ssrf_hook=True)
# Branch 2 (basic auth) — hook missing
return _create_and_validate(request, spec, user_config, "basic",
user_email=user_email)
# Branch 3 (OAuth/PAT) — hook missing
return _create_and_validate(request, spec, user_config, "oauth_pat",
user_email=user_email)attach_ssrf_hook defaults to False, so branches 2 and 3 silently skip the protection. The hook itself (_make_ssrf_safe_hook) is straightforward — it checks response.is_redirect, grabs the Location header, and calls validate_url_for_ssrf() to reject private IPs. It works correctly when present.
Typical attack flow:
- Attacker controls or compromises an Atlassian instance (Cloud or Server)
- MCP server connects using basic auth or OAuth credentials (most production setups)
- Atlassian returns
302 Location: http://169.254.169.254/latest/meta-data/iam/security-credentials/ - The unprotected session follows the redirect
- 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.
from unittest.mock import MagicMock
import requests
from mcp_atlassian.servers.dependencies import _make_ssrf_safe_hook
from mcp_atlassian.utils.urls import validate_url_for_ssrf
from mcp_atlassian.jira import JiraFetcher
from mcp_atlassian.jira.config import JiraConfig
config = JiraConfig(
url="https://attacker.atlassian.net",
auth_type="basic",
username="[email protected]",
api_token="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")
fake_redirect = MagicMock(spec=requests.Response)
fake_redirect.is_redirect = True
fake_redirect.headers = {"Location": "http://169.254.169.254/latest/meta-data/"}
blocked = False
for h in hooks:
try:
h(fake_redirect)
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 = _make_ssrf_safe_hook(validate_url_for_ssrf)
try:
hook(fake_redirect)
except ValueError as e:
print("header-PAT branch blocks:", e)Output:
$ 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 attach_ssrf_hook=True to _create_and_validate() in branches 2 and 3, the same way branch 1 already does.
Credited to hewei-gikaku.
Questions
- Which authentication modes were protected?
Only header PAT. Basic auth and OAuth sessions lacked the redirect hook, because
attach_ssrf_hookdefaults to False.- Does the attacker need to be on my network?
No. They need control of the Atlassian server the MCP server talks to, so the MCP server follows its redirect into your internal network.
- Is this related to GHSA-7r34-79r5-rcc9?
Yes. The advisory calls it an incomplete fix of that SSRF issue, since the working hook was not attached on two of three paths.
- Is a proof of concept public?
The advisory includes a mock-based script that shows the missing hook on a basic-auth session. No in-the-wild exploitation is reported.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77361
obsidian-tc : Symlink read-ACL scope bypass via lexical path checks
medium4.7Oct 23, 2026CVE-2026-114126
Storybook dev server vulnerable to code injection from the local network
high8.7Oct 22, 2026CVE-2026-113731
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
low3.3Oct 21, 2026CVE-2026-114125
Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
critical9.4Oct 21, 2026CVE-2026-111770
MCP TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another
high7.7Oct 20, 2026GHSA-953h-535j-jg2v
agent-router: MCP session resume does not verify the embedded anti-hijacking subject; default Helm seed makes session IDs forgeable
medium6.8Oct 19, 2026
