Executive brief
MCP (Model Context Protocol) for Atlassian is a server that integrates with Confluence to handle file downloads and attachments. A flaw in the path validation logic allows an authenticated attacker with Confluence write access to overwrite Python source files within the application directory, leading to remote code execution when the service restarts. This bypasses a previous security patch and affects all patched versions.
Technical details
The vulnerability is an incomplete path traversal fix in validate_safe_path() (mcp_atlassian/utils/io.py). When no explicit base_dir argument is provided, the function defaults to os.getcwd() (typically /app in containers). The is_relative_to() check then permits any path within the working directory, including Python source modules, to pass validation. Two call sites in confluence/attachments.py (download_attachment and download_content_attachments functions) invoke validate_safe_path() without specifying a base_dir, allowing attackers to write arbitrary .py files to the application source tree. On process restart, the malicious module code executes. The attack requires Confluence credentials with write access and network access to the MCP HTTP server (which binds to 0.0.0.0 with no authentication by default).
Affected products
- Atlassian MCP 0.17.0 through 0.21.0
Timeline
- 2026-09-22: disclosed: GHSA-6vmq-24h2-pj7j published