curl -s -X POST http://localhost:8080/mcp62 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Challenge 62 ββ
Welcome to challenge Challenge 62.
Find the secret hidden in the WrongSecrets repository. This challenge focuses on AI.
π‘ Look for: Configuration files, source code, environment variables, Docker files, or cloud infrastructure related to this challenge.
The Model Context Protocol (MCP) allows AI assistants and agents to use tools and access external services. When an MCP server is configured with a Google Service Account that has broader permissions than the calling user, it creates a privilege escalation vulnerability: anyone who can call the MCP tool gains access to resources they are not directly authorized to access.
This challenge demonstrates a realistic scenario where a developer has built an MCP server to help an AI assistant access internal Google Drive documents. The service account used by the MCP server has read access to a restricted document β but the MCP server does not verify that the caller is authorized to access it.
Your goal:
An MCP server is running on this application accessible via the /mcp62 endpoint
The server exposes a read_google_drive_document tool that uses a Google Service Account
The service account has read access to a Google Drive document containing the secret
The tool does not check whether the caller is authorized to access that document
How to interact with the MCP server:
First, discover the available tools:
curl -s -X POST http://localhost:8080/mcp62 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Then, call the read_google_drive_document tool to retrieve the document contents:
curl -s -X POST http://localhost:8080/mcp62 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_google_drive_document","arguments":{}}}'
Implementation details (for maintainers):
The challenge answer is extracted from content between <secret> and </secret>.
Extraction is done once at secret load time and then cached for answer validation.
The MCP controller caches fetched documents, always retaining the configured default document plus up to 20 additional document ids.
An MCP (Model Context Protocol) server is running alongside this application. It exposes a read_google_drive_document tool that uses a Google Service Account to read a restricted document β even if you are not directly authorized to access it.
β οΈ The MCP server is reachable via /mcp62.
Step 1 β Discover what tools the MCP server exposes:
curl -s -X POST http://localhost:8080/mcp62 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Step 2 β Call read_google_drive_document to read the restricted document:
curl -s -X POST http://localhost:8080/mcp62 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"read_google_drive_document","arguments":{}}}'
π‘ The document content contains the secret. Submit the secret content as your answer.