Hoch

MCP Atlassian: Arbitrary file read/exfiltration via upload_attachment missing validate_safe_path()

  • Veröffentlicht: 22.09.2026
  • Aktualisiert: 11.10.2026 15:18

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

python
# 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).

python
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:

js
{"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.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) mcp-atlassian < 0.22.0 0.22.0

Verweise

CVSS-Wert 7.7/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Schwäche (CWE)
CWE-22
Plattform
Python (PyPI)
Paket
mcp-atlassian
Veröffentlicht
22.09.2026
Aktualisiert
11.10.2026 15:18

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-4088 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-93xw-j965-9mx3 - CC BY 4.0

Schwachstellenhistorie: mcp-atlassian

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (30) im Archiv
Einträge insgesamt
30
Erste → letzte
03.2026 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 2
  • Hoch 19
  • Mittel 9

Veröffentlichungen pro Jahr

  1. 2026: 30
Schweregrad:
  1. MCP Atlassian: Arbitrary file read/exfiltration via upload_attachment missing validate_safe_path() dieser Eintrag
    Hoch · 7.7 CVE-2026-77258 < 0.22.0 0.22.0
  2. Hoch CVE-2026-77274 < 0.22.0 0.22.0
  3. Hoch CVE-2026-77267 < 0.22.0 0.22.0
  4. Hoch · 8.8 CVE-2026-77243 < 0.22.0 0.22.0
Mehr anzeigen (1) 20 von 21 angezeigt

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.