llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · mcp-atlassian

GHSA-H7WJ-5V37-59R2

MCP Atlassian: Path traversal in upload_attachment allows arbitrary file read (incomplete fix for CVE-2026-27825)

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -74 d de la divulgación
Exposición58 dDesde la divulgación, 22 sept 2026, 3:35 p. m.
Detección55 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 0.22.0
Monitoreo
Detectada
10 jul 26
22 sept 26
1 oct 26
17 nov 26
20 nov 26
10 jul 26
13 ago 26
15 sept 26
18 oct 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.22.0 mcp-atlassian · -74 d desde divulgación
Divulgación Publicada GHSA-H7WJ-5V37-59R2 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

The `confluence_upload_attachment` and `confluence_upload_attachments` MCP tools accept a `file_path` 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 `upload_attachment` 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 `validate_safe_path()` to download operations (v0.17.0). The same protection was not applied to upload operations.

Details

`validate_safe_path()` 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):

# confluence/attachments.py:222-223
validate_safe_path(target_path)  # resolves symlinks + checks is_relative_to(cwd)

Upload (vulnerable — not patched):

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

Same pattern in `jira/attachments.py:386`.

Proof of Concept
# Call via MCP client
await session.call_tool("confluence_upload_attachment", {
    "content_id": "12345",
    "file_path": "/home/user/.ssh/id_rsa"  # absolute path — no traversal needed
})
# SSH private key is now a Confluence attachment
# Retrieve via: confluence_download_attachment 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 `validate_safe_path(file_path)` call in `confluence/attachments.py:upload_attachment()` (reachable via MCP) and `jira/attachments.py:upload_attachment()` (not currently reachable via MCP, but should be patched preventively), consistent with the existing download protection. No changes to `validate_safe_path()` itself are needed.

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

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
mcp-atlassian< 0.22.0
0.22.0
0.24.4
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypimcp-atlassian
Corregida 0.22.0 -74 d 0.24.4 no afectada
Versiones corregidas0.22.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/sooperset/mcp-atlassian/security/advisories/GHSA-h7wj-5v37-59r2
Otrahttps://github.com/sooperset/mcp-atlassian/pull/1448
Otrahttps://github.com/sooperset/mcp-atlassian/commit/b041733473f95119dd539542a43c280737a8e460
Otrahttps://github.com/sooperset/mcp-atlassian
Otrahttps://github.com/sooperset/mcp-atlassian/releases/tag/v0.22.0

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.