CVE-2026-77268: MCP Atlassian Insecure File Permissions On OAuth Vulnerability

MODERATE
Advisory Identifier: GHSA-4596-2p6p-28cv
CVSS 5.5
CWE-732
Published
Advisory Summary

CVE-2026-77268 is a MODERATE (CVSS 5.5) insecure file permissions on oauth vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting MCP Atlassian libraries in the PyPI ecosystem. The issue involves insecure file permissions on oauth token storage. Remediation is available by upgrading affected packages to version 0.22.0.

CVE-2026-77268 at a Glance

CVE Identifier CVE-2026-77268
GHSA Identifier GHSA-4596-2p6p-28cv
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product MCP Atlassian
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

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

How to Fix CVE-2026-77268

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-77268, 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-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. 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 token fallback file storage in `OAuthConfig._save_tokens_to_file()` creates token files containing access tokens, refresh tokens, and cloud IDs with default filesystem permissions (typically `0644` on Linux, world-readable). Any local user on a shared system can read these files to obtain full Atlassian API credentials, enabling unauthorized access to the victim's Jira and Confluence data. ## Details The vulnerability exists in `src/mcp_atlassian/utils/oauth.py` in the `_save_tokens_to_file` method. **Step 1 -- Directory created without restrictive permissions:** At line 402-403, the token directory is created with `mkdir(exist_ok=True)` which uses the default umask (typically creating directories with mode `0755`): ```python # src/mcp_atlassian/utils/oauth.py:402-403 token_dir = Path.home() / ".mcp-atlassian" token_dir.mkdir(exist_ok=True) ``` **Step 2 -- Token file written with default permissions:** At line 417-418, the token file containing sensitive credentials is written using `open()` with no explicit mode, inheriting default umask permissions (typically `0644` on Linux): ```python # src/mcp_atlassian/utils/oauth.py:406-418 token_path = token_dir / f"oauth-{self.client_id}.json" if token_data is None: token_data = { "refresh_token": self.refresh_token, "access_token": self.access_token, "expires_at": self.expires_at, "cloud_id": self.cloud_id, "base_url": self.base_url, } with open(token_path, "w") as f: json.dump(token_data, f) ``` **Step 3 -- The file contains full API credentials:** The token file contains: - `access_token`: A valid OAuth access token for the Atlassian API - `refresh_token`: Can be exchanged for new access tokens indefinitely - `cloud_id`: Identifies the target Atlassian Cloud instance - `base_url`: The target Data Center instance URL **No `os.chmod` or `os.fchmod` is called** anywhere after file creation. The primary storage via `keyring` (line 373) is secure, but the fallback file storage at line 386 is always written in addition to keyring (line 386: `self._save_tokens_to_file(token_data)`). When keyring fails (common in headless/container/CI environments), the fallback becomes the only storage. ## PoC ```bash # Step 1: Victim runs mcp-atlassian with OAuth and completes the flow. # This creates the token file. # Step 2: As any other user on the same system, read the token file: cat /home/victim/.mcp-atlassian/oauth-*.json # Expected output (sensitive credentials in plaintext): # {"refresh_token": "eyJ...", "access_token": "eyJ...", "expires_at": 1741234567.0, "cloud_id": "abc-123", "base_url": null} # Step 3: Verify the token works: curl -H "Authorization: Bearer <stolen_access_token>" \ "https://api.atlassian.com/ex/jira/<stolen_cloud_id>/rest/api/3/myself" # Step 4: Use the refresh token to get a new access token: curl -X POST "https://auth.atlassian.com/oauth/token" \ -d "grant_type=refresh_token" \ -d "client_id=<from_env>" \ -d "client_secret=<from_env>" \ -d "refresh_token=<stolen_refresh_token>" ``` **Verify file permissions (on Linux/macOS):** ```bash ls -la ~/.mcp-atlassian/ # drwxr-xr-x 2 user user 4096 Mar 10 12:00 . # -rw-r--r-- 1 user user 256 Mar 10 12:00 oauth-abc123.json # ^^ ^^ ^^ # world-readable! ``` ## Impact - **Credential theft**: Any local user can read the OAuth tokens and impersonate the victim on their Atlassian Cloud/Data Center instance. - **Persistent access**: The refresh token allows the attacker to generate new access tokens indefinitely, even after the original access token expires. - **Full API access**: The stolen tokens grant the same API permissions as the victim, including reading/writing Jira issues, Confluence pages, and potentially sensitive project data. - **Affected environments**: Shared servers, CI/CD runners, multi-user workstations, and containerized deployments where the fallback file storage is used (keyring unavailable). ## Recommended Fix **1. Set restrictive permissions on the directory and file:** ```python # src/mcp_atlassian/utils/oauth.py import os import stat def _save_tokens_to_file(self, token_data: dict | None = None) -> None: """Save the tokens to a file as fallback storage.""" try: token_dir = Path.home() / ".mcp-atlassian" token_dir.mkdir(exist_ok=True, mode=0o700) token_path = token_dir / f"oauth-{self.client_id}.json" if token_data is None: token_data = { "refresh_token": self.refresh_token, "access_token": self.access_token, "expires_at": self.expires_at, "cloud_id": self.cloud_id, "base_url": self.base_url, } # Open with restrictive permissions (owner-only read/write) fd = os.open( str(token_path), os.O_WRONLY | os.O_CREAT | os.O_TRUNC, stat.S_IRUSR | stat.S_IWUSR, # 0o600 ) try: with os.fdopen(fd, "w") as f: json.dump(token_data, f) except Exception: os.close(fd) raise logger.debug(f"Saved OAuth tokens to file {token_path} (fallback storage)") except Exception as e: logger.error(f"Failed to save tokens to file: {e}") ``` **2. Additionally, fix the directory permissions for existing installations:** ```python # In __init__ or from_env, ensure existing directories are tightened token_dir = Path.home() / ".mcp-atlassian" if token_dir.exists(): os.chmod(str(token_dir), 0o700) ```

CVE-2026-77268 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-77268?
CVE-2026-77268 is a security vulnerability in MCP Atlassian involving Insecure File Permissions on OAuth Token Storage under CWE-732: Incorrect Permission Assignment for Critical Resource.
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-77268?
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-77268?
CVE-2026-77268 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-77268?
CVE-2026-77268 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check PyPI dependencies for CVE-2026-77268?
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-4596-2p6p-28cv",
  "modified" : "2026-09-22T20:35:19Z",
  "published" : "2026-09-22T20:35:19Z",
  "aliases" : [ "CVE-2026-77268" ],
  "summary" : "MCP Atlassian: Insecure File Permissions on OAuth Token Storage",
  "details" : "## Summary\n\nThe OAuth token fallback file storage in `OAuthConfig._save_tokens_to_file()` creates token files containing access tokens, refresh tokens, and cloud IDs with default filesystem permissions (typically `0644` on Linux, world-readable). Any local user on a shared system can read these files to obtain full Atlassian API credentials, enabling unauthorized access to the victim's Jira and Confluence data.\n\n## Details\n\nThe vulnerability exists in `src/mcp_atlassian/utils/oauth.py` in the `_save_tokens_to_file` method.\n\n**Step 1 -- Directory created without restrictive permissions:**\n\nAt line 402-403, the token directory is created with `mkdir(exist_ok=True)` which uses the default umask (typically creating directories with mode `0755`):\n\n```python\n# src/mcp_atlassian/utils/oauth.py:402-403\ntoken_dir = Path.home() / \".mcp-atlassian\"\ntoken_dir.mkdir(exist_ok=True)\n```\n\n**Step 2 -- Token file written with default permissions:**\n\nAt line 417-418, the token file containing sensitive credentials is written using `open()` with no explicit mode, inheriting default umask permissions (typically `0644` on Linux):\n\n```python\n# src/mcp_atlassian/utils/oauth.py:406-418\ntoken_path = token_dir / f\"oauth-{self.client_id}.json\"\n\nif token_data is None:\n    token_data = {\n        \"refresh_token\": self.refresh_token,\n        \"access_token\": self.access_token,\n        \"expires_at\": self.expires_at,\n        \"cloud_id\": self.cloud_id,\n        \"base_url\": self.base_url,\n    }\n\nwith open(token_path, \"w\") as f:\n    json.dump(token_data, f)\n```\n\n**Step 3 -- The file contains full API credentials:**\n\nThe token file contains:\n- `access_token`: A valid OAuth access token for the Atlassian API\n- `refresh_token`: Can be exchanged for new access tokens indefinitely\n- `cloud_id`: Identifies the target Atlassian Cloud instance\n- `base_url`: The target Data Center instance URL\n\n**No `os.chmod` or `os.fchmod` is called** anywhere after file creation.\n\nThe primary storage via `keyring` (line 373) is secure, but the fallback file storage at line 386 is always written in addition to keyring (line 386: `self._save_tokens_to_file(token_data)`). When keyring fails (common in headless/container/CI environments), the fallback becomes the only storage.\n\n## PoC\n\n```bash\n# Step 1: Victim runs mcp-atlassian with OAuth and completes the flow.\n# This creates the token file.\n\n# Step 2: As any other user on the same system, read the token file:\ncat /home/victim/.mcp-atlassian/oauth-*.json\n\n# Expected output (sensitive credentials in plaintext):\n# {\"refresh_token\": \"eyJ...\", \"access_token\": \"eyJ...\", \"expires_at\": 1741234567.0, \"cloud_id\": \"abc-123\", \"base_url\": null}\n\n# Step 3: Verify the token works:\ncurl -H \"Authorization: Bearer <stolen_access_token>\" \\\n  \"https://api.atlassian.com/ex/jira/<stolen_cloud_id>/rest/api/3/myself\"\n\n# Step 4: Use the refresh token to get a new access token:\ncurl -X POST \"https://auth.atlassian.com/oauth/token\" \\\n  -d \"grant_type=refresh_token\" \\\n  -d \"client_id=<from_env>\" \\\n  -d \"client_secret=<from_env>\" \\\n  -d \"refresh_token=<stolen_refresh_token>\"\n```\n\n**Verify file permissions (on Linux/macOS):**\n\n```bash\nls -la ~/.mcp-atlassian/\n# drwxr-xr-x  2 user user 4096 Mar 10 12:00 .\n# -rw-r--r--  1 user user  256 Mar 10 12:00 oauth-abc123.json\n#                ^^ ^^ ^^\n#                world-readable!\n```\n\n## Impact\n\n- **Credential theft**: Any local user can read the OAuth tokens and impersonate the victim on their Atlassian Cloud/Data Center instance.\n- **Persistent access**: The refresh token allows the attacker to generate new access tokens indefinitely, even after the original access token expires.\n- **Full API access**: The stolen tokens grant the same API permissions as the victim, including reading/writing Jira issues, Confluence pages, and potentially sensitive project data.\n- **Affected environments**: Shared servers, CI/CD runners, multi-user workstations, and containerized deployments where the fallback file storage is used (keyring unavailable).\n\n## Recommended Fix\n\n**1. Set restrictive permissions on the directory and file:**\n\n```python\n# src/mcp_atlassian/utils/oauth.py\n\nimport os\nimport stat\n\ndef _save_tokens_to_file(self, token_data: dict | None = None) -> None:\n    \"\"\"Save the tokens to a file as fallback storage.\"\"\"\n    try:\n        token_dir = Path.home() / \".mcp-atlassian\"\n        token_dir.mkdir(exist_ok=True, mode=0o700)\n\n        token_path = token_dir / f\"oauth-{self.client_id}.json\"\n\n        if token_data is None:\n            token_data = {\n                \"refresh_token\": self.refresh_token,\n                \"access_token\": self.access_token,\n                \"expires_at\": self.expires_at,\n                \"cloud_id\": self.cloud_id,\n                \"base_url\": self.base_url,\n            }\n\n        # Open with restrictive permissions (owner-only read/write)\n        fd = os.open(\n            str(token_path),\n            os.O_WRONLY | os.O_CREAT | os.O_TRUNC,\n            stat.S_IRUSR | stat.S_IWUSR,  # 0o600\n        )\n        try:\n            with os.fdopen(fd, \"w\") as f:\n                json.dump(token_data, f)\n        except Exception:\n            os.close(fd)\n            raise\n\n        logger.debug(f\"Saved OAuth tokens to file {token_path} (fallback storage)\")\n    except Exception as e:\n        logger.error(f\"Failed to save tokens to file: {e}\")\n```\n\n**2. Additionally, fix the directory permissions for existing installations:**\n\n```python\n# In __init__ or from_env, ensure existing directories are tightened\ntoken_dir = Path.home() / \".mcp-atlassian\"\nif token_dir.exists():\n    os.chmod(str(token_dir), 0o700)\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/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-4596-2p6p-28cv"
  }, {
    "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-732" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-22T20:35:19Z",
    "nvd_published_at" : null
  }
}