sooperset/mcp-atlassian is an MCP server for Jira and Confluence with 6,139 stars on GitHub. Version 0.16.0 has two published CVEs, one of them critical. I maintain mcpscan, a static scanner for MCP servers, and back in September I extended its path traversal rule to cover file writes after reading about the critical one. This week I ran the scanner against the vulnerable release itself, and it found neither CVE.

TL;DR

  • mcpscan 0.21.0 reported 7 findings on mcp-atlassian v0.16.0. None was a real bug. It missed CVE-2026-27825 (file write, CVSS 9.1) and CVE-2026-27826 (SSRF).
  • The patched v0.17.0 got the same 7 findings, line for line.
  • Reading the code by hand, following each path parameter to the place it gets written, found the 4 sites upstream fixed in 0.17.0.
  • mcpscan 0.22.0, released today, flags the two vulnerable write sinks as HIGH and has no MCP007 finding on the patched release. It still does not see the SSRF, and it loses track of a path that passes through several functions.

The two CVEs

CVE Severity What Fixed in
CVE-2026-27825 Critical, CVSS 9.1 Arbitrary file write leading to code execution, through the unconstrained download path in confluence_download_attachment 0.17.0
CVE-2026-27826 High SSRF through the X-Atlassian-Jira-Url and X-Atlassian-Confluence-Url headers 0.17.0

The advisory range for the file write is <0.17.0. The fix calls validate_safe_path(...) before every download is written.

What mcpscan 0.21.0 reported

I scanned src/ of the v0.16.0 tag: 94 files, about 6 seconds, 30 rules, 7 findings.

mcpscan 0.21.0 on mcp-atlassian v0.16.0: 7 findings, 0 real bugs. MCP005 hardcoded secret on utils/oauth.py lines 30 and 39, the URL constants CLOUD_TOKEN_URL and DC_TOKEN_PATH that maintainers had already marked noqa S105: not a secret. MCP007 path traversal on utils/oauth_setup.py lines 141 and 149, JavaScript window.open inside an HTML string in Python: not a file path. MCP010 TLS verification off on utils/ssl.py lines 42, 43 and 69, only when the operator sets ssl_verify to false: by design. Not found: CVE-2026-27825 and CVE-2026-27826. The patched v0.17.0 got exactly the same 7 findings.

Going through them one by one:

  • Two MCP005 "hardcoded secret" hits in utils/oauth.py:30 and :39. They are CLOUD_TOKEN_URL and DC_TOKEN_PATH, an OAuth endpoint URL and a path. The maintainers had already marked both # noqa: S105, the same complaint from their own linter.
  • Two MCP007 "path traversal" hits in utils/oauth_setup.py:141 and :149. Both are JavaScript window.open( calls inside an HTML page that Python builds as a string. My regex saw open( and fired.
  • Three MCP010 "TLS verification disabled" hits in utils/ssl.py:42, :43 and :69. That code only runs when the operator sets ssl_verify=false, so it is there by design.

Then I scanned v0.17.0, the release that fixes both CVEs. Same 7 findings, same files, same lines. Whatever the report was measuring, it was not the security of the download path.

What found it: a manual trace

The question I asked by hand was narrow. For every function that writes a file, where does the path come from, and does anything check that it stays inside a base directory before the write?

In src/mcp_atlassian/confluence/attachments.py on v0.16.0 the answer takes a few lines to find:

def download_attachment(self, url: str, target_path: str) -> bool: ... # Convert to absolute path if relative if not os.path.isabs(target_path): target_path = os.path.abspath(target_path) # Create the directory if it doesn't exist os.makedirs(os.path.dirname(target_path), exist_ok=True) # Use the Confluence session to download the file response = self.confluence._session.get(url, stream=True) response.raise_for_status() # Write the file to disk with open(target_path, "wb") as f: 

target_path is a parameter. os.path.abspath makes it absolute and does nothing to limit where it points. os.makedirs creates whatever directory is missing. Line 198 writes the downloaded bytes there. jira/attachments.py has the same shape, with the write at line 50.

Following the callers turned up two more functions, download_content_attachments and download_issue_attachments, which take a target directory and write through those two. That makes 4 sites, and they are the same 4 that upstream patched in 0.17.0.

Flow of CVE-2026-27825 in confluence/attachments.py of mcp-atlassian v0.16.0: the MCP tool call confluence_download_attachment, where the caller picks the download path, goes to download_attachment(url, target_path), then os.path.abspath(target_path), which makes it absolute but does not limit where it points, then os.makedirs(dirname), which creates any missing directory, then open(target_path, "wb") on line 198, which writes the attachment bytes. Fixed in 0.17.0 by validate_safe_path(target_path) between abspath and makedirs, which resolves symlinks and raises ValueError unless the path is relative to the base directory, the working directory by default.

In download_attachment the upstream fix is one call after abspath:

 # Guard against path traversal (resolves symlinks) validate_safe_path(target_path) 

validate_safe_path resolves the path, symlinks included, and raises ValueError unless the result is_relative_to the base directory, which defaults to the working directory.

Why MCP007 missed it

The September change added write sinks to MCP007, but the rule still only fired when the path was interpolated on the same line as the sink. It catches open(f"{base}/{name}", "w"). The vulnerable line here is with open(target_path, "wb") as f:. There is nothing on that line for a regex to object to. The danger is that target_path came in from the caller at the top of the function and nothing checked it in between, and a line-based rule has no view of that.

The fix in mcpscan 0.22.0

mcpscan 0.22.0 adds a small ast pass for each Python function, next to the existing line regex:

  1. Start from the function's parameters. Names assigned from a parameter p, from Path(p) or from os.path.abspath(p) count as the same value.
  2. Look for a write sink that receives one of those names: open with a w, a, x or + mode, write_text, write_bytes, shutil.copy, copy2, copyfile and move, and os.rename and os.replace.
  3. If the function has no boundary check, report it as HIGH. A boundary check is realpath or resolve followed by startswith, is_relative_to or commonpath, or a call to anything named like *safe_path* or *validate_path*.

It also stopped matching window.open(.

A 2 by 2 grid of MCP007 findings. mcpscan 0.21.0 on v0.16.0, the vulnerable release: 2 false positives from window.open in oauth_setup.py, 7 findings in total, 0 real bugs. mcpscan 0.22.0 on v0.16.0: 2 HIGH findings, both real, confluence/attachments.py:198 and jira/attachments.py:50, 7 findings in total. mcpscan 0.21.0 on v0.17.0, the patched release: the same 2 false positives, 7 findings in total. mcpscan 0.22.0 on v0.17.0: no MCP007 finding, 5 findings in total with MCP005 and MCP010 unchanged. Neither version reports the SSRF CVE-2026-27826.

On v0.16.0, MCP007 now reports confluence/attachments.py:198 and jira/attachments.py:50 as HIGH. On v0.17.0 it reports nothing, and the total drops to 5: the unchanged MCP005 and MCP010 findings. The release has 8 new tests, the full suite passes 266 of 266, and mcpscan's scan of its own code is clean.

Getting that self-scan clean needed one suppression. drift.py writes mcpscan's own baseline file to a path that arrives as a parameter, which is exactly the shape the new check looks for:

with open(path, "w", encoding="utf-8") as fh: # mcpscan: ignore[MCP007] baseline path is ours, not tool input 

That is the noise the check will add elsewhere. In an MCP server, a path parameter often comes from a tool call, and an unchecked write to it is the bug. In a generic utility or a CLI that writes where its own user told it to, the same pattern is fine, and you will be suppressing it.

What it still cannot do

  • A path that passes through several functions before the write is not tracked. The pass looks at one function at a time. It flags the two functions that do the writing in mcp-atlassian, while the two download-all functions that pass a directory down to them get no finding of their own.
  • A check that lives in the caller is not recognised. If the caller validates the path and the writing function does not, 0.22.0 still reports the writing function.
  • The SSRF is still missed. 0.22.0 changed MCP007 and nothing else, so on this release it gets 1 of the 2 CVEs, the file write.
  • The "14 of 14, zero false positives" benchmark I published earlier measured synthetic fixtures I wrote myself. It says nothing about detection on real code, and this run shows the difference.

Where the scanner fits in a review

Automated MCP scanners are sold for about $0.25 per server on Apify. That price is fine for what a scanner does. In this case the review was the human trace: take every input a tool call controls, follow it to the file system, the network or a shell, and look for what stops it. The scanner is the second pass, useful for the code you did not get to and for catching the same mistake when it comes back.

mcpscan 0.22.0 is on PyPI as mcpscan-cli:

pip install -U mcpscan-cli mcpscan ./path-to-an-mcp-server 

If you run an MCP server and want that trace done before a release, I offer a free preflight.