GHSA-93xw-j965-9mx3

Suggest an improvement
Source
https://github.com/advisories/GHSA-93xw-j965-9mx3
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-93xw-j965-9mx3/GHSA-93xw-j965-9mx3.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-93xw-j965-9mx3
Aliases
Published
2026-09-22T20:36:37Z
Modified
2026-09-22T21:00:07Z
Severity
  • 7.7 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N CVSS Calculator
Summary
MCP Atlassian: Arbitrary file read/exfiltration via upload_attachment missing validate_safe_path()
Details

Summary

The upload_attachment method in confluence/attachments.py reads and uploads arbitrary local files to Confluence without calling validate_safe_path(). Both download methods (download_attachment at line 223, download_content_attachments at line 272) correctly call validate_safe_path() before writing files, but the upload path at lines 35-79 skips this check entirely.

An AI agent connected via MCP (or an attacker influencing that agent through prompt injection) can read any file on the host and exfiltrate it by uploading it as a Confluence page attachment.

Vulnerable Code

File: src/mcp_atlassian/confluence/attachments.py, lines 62-79

# No validate_safe_path() call anywhere in this method
if not os.path.isabs(file_path):
    file_path = os.path.abspath(file_path)

if not os.path.exists(file_path):
    return {"success": False, "error": f"File not found: {file_path}"}

filename = os.path.basename(file_path)
attachment = self._upload_attachment_direct(
    content_id, file_path, filename, comment, minor_edit
)

The validate_safe_path function is already imported at line 9 of the same file, and used in the download methods. It was just not added to the upload path.

Proof of Concept

Tested with mcp-atlassian 0.21.1 on Python 3.11 (EC2, Amazon Linux 2023).

import inspect
from mcp_atlassian.confluence.attachments import AttachmentsMixin

# Confirm: no validate_safe_path in upload
source = inspect.getsource(AttachmentsMixin.upload_attachment)
assert "validate_safe_path" not in source  # passes

# Confirm: validate_safe_path IS in downloads
assert "validate_safe_path" in inspect.getsource(AttachmentsMixin.download_attachment)  # passes
assert "validate_safe_path" in inspect.getsource(AttachmentsMixin.download_content_attachments)  # passes

An MCP tool call like this reads /etc/passwd and uploads it to Confluence:

{"tool": "confluence_upload_attachment", "arguments": {"content_id": "123456", "file_path": "/etc/passwd"}}

Impact

Exfiltration of any file readable by the MCP server process: SSH keys, AWS credentials, .env files, /etc/passwd, application secrets. Data leaves the local machine and lands on a remote Confluence instance accessible to other users.

Suggested Fix

Add validate_safe_path(file_path) before the os.path.exists() check in upload_attachment, matching the existing pattern in the download methods. The function is already imported.

Database specific
{
    "cwe_ids":  [
        "CWE-22"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-09-22T20:36:37Z",
    "nvd_published_at":  "2026-09-22T18:17:18Z",
    "severity":  "HIGH"
}
References

Affected packages

PyPI / mcp-atlassian

Package

Name
mcp-atlassian
View open source insights on deps.dev
Purl
pkg:pypi/mcp-atlassian

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.22.0

Affected versions

0.*
0.1.1
0.1.2
0.1.3
0.1.4
0.1.6
0.1.7
0.1.8
0.1.9
0.1.10
0.1.11
0.1.12
0.1.13
0.1.14
0.1.15
0.1.16
0.2.0
0.2.1
0.2.2
0.2.3
0.2.4
0.2.5
0.2.6
0.3.0
0.3.1
0.4.0
0.5.0
0.6.0
0.6.1
0.6.2
0.6.3
0.6.4
0.6.5
0.7.0
0.7.1
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.9.0
0.10.0
0.10.1
0.10.2
0.10.3
0.10.4
0.10.5
0.10.6
0.11.0
0.11.1
0.11.2a2
0.11.2
0.11.3
0.11.4
0.11.5
0.11.6
0.11.7
0.11.8
0.11.9
0.11.10
0.11.11
0.11.12
0.12.0
0.13.0
0.13.1
0.14.0
0.14.1
0.14.2
0.14.3
0.15.0
0.16.0
0.16.1
0.17.0
0.18.0
0.18.1
0.19.0
0.20.0
0.20.1
0.21.0
0.21.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-93xw-j965-9mx3/GHSA-93xw-j965-9mx3.json"