Advisory

PYSEC-2026-4099

Details, part 2 of 2. The advisory

Details

Defense in depth
Tighten the Pydantic tool schema at src/mcp_atlassian/servers/confluence.py:1307:

file_path: Annotated[
    str,
    Field(
        description="Relative path within the configured upload directory",
        pattern=r"^(?!/)(?!.*\.\.)[\w\-./]+$",
    ),
]

This blocks absolute paths and .. at the MCP schema layer before the handler is even entered.

Additional hardening (out of scope but recommended)

  • Default streamable-http to 127.0.0.1 instead of 0.0.0.0, or require an auth token when bound to a non-loopback interface.
  • Document that file_path must be confined to an operator-chosen directory and expose that directory via config.

Sources & licences