Skip to content
SSRF Write-up Intermediate

Otto Support - SSRF and Token Passthrough with MCP

The mcp-atlassian server read custom headers to determine upstream API destinations without URL validation, allowing an unauthenticated attacker on the local network to redirect outbound requests to attacker-controlled infrastructure. This SSRF was chained with a path traversal to exfiltrate sensitive files and achieve remote code execution.

bishopfox.com

Published on bishopfox.com

The previous blog in our otto-support CTF challenge series closed on the principle that an agent should hold only the tools its task requires. Two of the most common Model Context Protocol (MCP) capabilities also happen to be two of the most reliably dangerous.

The author, on bishopfox.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the server used client-supplied headers to set upstream API URLs without validating or allowlisting destinations, and also bound to all interfaces without authentication.

Impact

An unauthenticated attacker on the local network could exfiltrate sensitive files and achieve remote code execution on the developer's machine.

What the attacker needed

Attacker on the same local network; no authentication required

The fix

The vulnerability was fixed in version 0.17.0 by adding SSRF protections with domain allowlisting.

How it was found

  1. An attacker on the local network sends a request to the MCP server with a malicious URL in the custom Atlassian URL headers.
  2. The server makes outbound requests to the attacker-controlled URL, exfiltrating sensitive files such as AWS credentials and SSH keys.
  3. The attacker uses the path traversal in the confluence_download_attachment tool to write executable code to shell startup files.
  4. The code executes on the next shell invocation, achieving remote code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Server-side request forgery (SSRF) is when an attacker makes a server send requests to places the attacker cannot reach directly, like internal services or cloud metadata. Here, the server trusted a URL from a request header and fetched it without checking, letting an attacker on the same network steal files and run code.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.