Summary
MCP Atlassian's attachment upload functionality can open a caller-selected local file without confirming that its resolved path remains within the permitted workspace. A caller able to invoke this functionality may upload readable host files, including environment files or credentials, to Confluence and retrieve them through Atlassian.
Affected context
The issue occurs in deployments using MCP Atlassian's confluence_upload_attachment operation when:
- The operation accepts a caller-controlled
file_path - The server reads that path as a local binary file
- The resolved path is not constrained to an approved workspace
- The MCP caller can cause an attachment upload to a Confluence page
The exposure depends on the server account's local file permissions and the caller's ability to invoke the affected operation.
Exploit preconditions
- Attack surface: MCP tool interface for Confluence attachment uploads
- Required access: Permission or capability to invoke
confluence_upload_attachment - Trigger point: Processing of the caller-supplied
file_pathbefore the attachment is uploaded - Why exploitation is possible: The server opens the selected path without verifying that its canonical or resolved location remains within the intended workspace
- Additional dependency: The target file must be readable by the MCP server process, and the caller must be able to access the resulting Confluence attachment
Why this happens
The underlying bug is insufficient path containment validation. The upload handler treats a caller-provided path as trusted and passes it to a file-opening operation without first resolving it and enforcing that it remains below an approved workspace directory.
This behavior maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). It is also related to CWE-552: Files or Directories Accessible to External Parties, because local files become externally retrievable through the Atlassian upload flow.
Potential impact
- Sensitive environment files or credentials may be disclosed
- Configuration files and private application data could be uploaded to Confluence
- Exposed secrets may enable access to connected services or infrastructure
- The incident may create persistent copies of sensitive data in Atlassian content
- Confidentiality of the MCP host and related systems could be reduced
General mitigation guidance
Mitigation generally focuses on making file access workspace-bound and reducing trust in caller-supplied paths.
Common defensive patterns include:
- Resolve and canonicalize paths before opening files
- Enforce strict containment within an approved workspace directory
- Reject absolute paths, traversal segments, symlink escapes, and ambiguous path representations
- Prefer workspace-relative identifiers or server-selected file handles over arbitrary filesystem paths
- Apply allowlists for permitted files and attachment sources
- Run the MCP server with a dedicated low-privilege account and minimal filesystem access
- Prevent sensitive files from residing in directories exposed to upload workflows
- Limit where uploaded attachments may be published and enforce appropriate Atlassian permissions
How teams detect issues like this
Detection approaches can include:
- Static analysis rules for file-opening operations that consume request, tool, or API parameters
- Code review checks for missing canonicalization and directory-containment validation
- Searches for
open()or equivalent filesystem APIs near upload or export handlers - Tests covering absolute paths, traversal sequences, symlink escapes, and workspace boundary conditions
- Runtime monitoring for access to sensitive paths by the MCP process
- Policy enforcement that restricts file reads and attachment uploads to approved directories and destinations
Automated security review tools may help identify untrusted path flows, but findings should be validated against deployment permissions and filesystem behavior.

