Skip to content
HighVulnerability

GHSA-g5r6-gv6m-f5jv: mcp-atlassian: Arbitrary file read via missing path validation in confluence_upload_attachment

Published
Record updated
View JSON
Affected
  • mcp-atlassian < 0.22.0
Fixed in
0.22.0

Summary

The mcp-atlassian server's confluence_upload_attachment tool passes a caller-supplied file_path directly to open() in _upload_attachment_direct() in src/mcp_atlassian/confluence/attachments.py, without the validate_safe_path() check that download_attachment() applies. Any authenticated MCP client, or an AI agent steered by prompt injection, can read files the server process can access and upload them to Confluence as attachments. The source reports this was confirmed against v0.21.1 and that /proc/self/environ, which can expose API tokens and other secrets on a Linux deployment, was exfiltrated.

Mitigation

Add validate_safe_path(file_path) before the open() call in _upload_attachment_direct(), as the source proposes.