GHSA-h7wj-5v37-59r2: Path Traversal

Published Sep 22, 2026
·
Updated

Summary

The confluenceuploadattachment and confluenceuploadattachments MCP tools accept a filepath parameter and do not validate that the path is confined to an allowed directory before opening the file. An attacker who can call these tools can read any file accessible to the MCP server process (SSH keys, .env files, API credentials) and exfiltrate it by uploading it to Confluence.

Note: The Jira uploadattachment mixin method in jira/attachments.py has the same missing validation, but it is NOT registered as an MCP tool in servers/jira.py and is therefore not currently reachable via MCP. It should still be patched to prevent future exposure if Jira upload tools are added.

This is an incomplete fix for CVE-2026-27825. That CVE was patched by adding validatesafepath() to download operations (v0.17.0). The same protection was not applied to upload operations.

Details

validatesafepath() is imported in both confluence/attachments.py and jira/attachments.py and is correctly called in all download functions. It is absent from the Confluence upload functions (which are exposed as MCP tools) and from the Jira upload mixin methods (which are not currently registered as MCP tools but should still be patched).

Download (protected — correctly patched): python confluence/attachments.py:222-223 validatesafepath(targetpath) # resolves symlinks + checks isrelativeto(cwd)

Upload (vulnerable — not patched): python confluence/attachments.py:64-79 — NO validatesafepath() call if not os.path.isabs(filepath): filepath = os.path.abspath(filepath) # normalizes but does NOT restrict ... files = {"file": (filename, open(filepath, "rb"))} # opens arbitrary file

Same pattern in jira/attachments.py:386.

Proof of Concept

python Call via MCP client await session.calltool("confluenceuploadattachment", { "contentid": "12345", "filepath": "/home/user/.ssh/idrsa" # absolute path — no traversal needed }) SSH private key is now a Confluence attachment Retrieve via: confluencedownloadattachment or Confluence UI

Impact

Arbitrary file read from the server filesystem. High-value targets: SSH private keys, .env files, AWS/GCP credentials, database configuration, source code.

Fix

Add validatesafepath(filepath) call in confluence/attachments.py:uploadattachment() (reachable via MCP) and jira/attachments.py:uploadattachment() (not currently reachable via MCP, but should be patched preventively), consistent with the existing download protection. No changes to validatesafepath() itself are needed.

python Add after os.path.abspath() call: try: validatesafepath(filepath) except ValueError as e: return {"success": False, "error": str(e)}

Affected Software

1 affected componentFixes available
pip/mcp-atlassian<0.22.0
0.22.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/mcp-atlassian to a version that resolves this vulnerability.

    Fixed in 0.22.0
  2. Compensating control

    Add a validate_safe_path(file_path) call to confluence/attachments.py:upload_attachment() and jira/attachments.py:upload_attachment() before opening the file, consistent with the existing download validation; this must cover the MCP-exposed Confluence upload tools and the Jira mixin preventively.

Event History

Sep 22, 2026
Advisory Published
via GitHub·08:35 PM
Data Sourced
via GitHub·08:35 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are directly exposed through MCP?

Deployments exposing the Confluence attachment upload tools are directly affected: confluence_upload_attachment and confluence_upload_attachments. The analogous Jira upload method is not currently registered as an MCP tool, so it is not currently reachable through MCP.

2

What access does an attacker need to exploit this?

An attacker needs the ability to call one of the affected Confluence MCP upload tools. They can then request a path to any file readable by the MCP server process and have it uploaded to Confluence.

3

What is the likely impact if exploitation succeeds?

Files accessible to the MCP server process may be disclosed, including SSH keys, .env files, and API credentials. The issue affects uploads because path validation was applied to download operations but was absent from the affected upload functions.

4

Should the Jira upload code also be addressed?

Yes. Although it is not currently exposed through MCP, the Jira upload mixin has the same missing validation and should be patched to avoid future exposure if Jira upload tools are added.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203