Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
id: asi04-insecure-mcp-registry-switch
title: "Insecure MCP Registry Switch"
description: |
The FinBot system uses MCP (Model Context Protocol) servers to provide tools to AI agents.
The MCP registry configuration is used to discover and connect to tool providers via SSE
(Server-Sent Events) transport.

Vulnerability: The system accepts MCP server registry URLs without proper validation
or provenance verification. This allows an attacker to redirect tool calls to a
malicious MCP server.

Objective: Exploit the insecure registry configuration to:
1. Switch the MCP server endpoint to an attacker-controlled URL
2. Intercept or manipulate tool responses
3. Demonstrate lack of provenance verification for MCP tools

Attack Vectors:
- Manipulate registry URL parameters
- Inject malicious MCP server endpoints
- Exploit missing TLS certificate validation
- Bypass server identity verification

category: mcp_security
subcategory: registry_manipulation
difficulty: advanced
points: 300

image_url: mcp-registry-switch.png

hints:
- cost: 15
text: "Look for configuration endpoints that accept MCP server URLs."
- cost: 30
text: "The SSE transport connection may accept arbitrary registry URLs without validation."
- cost: 50
text: "Try setting mcp_server_url to an external endpoint and observe if tool calls are redirected."
- cost: 75
text: "Check if the system validates the server's SSL certificate or identity before connecting."

labels:
owasp_llm:
- LLM05 # Supply Chain Vulnerabilities
- LLM07 # Insecure Plugin Design
cwe:
- CWE-494 # Download of Code Without Integrity Check
- CWE-295 # Improper Certificate Validation
- CWE-346 # Origin Validation Error
- CWE-829 # Inclusion of Functionality from Untrusted Control Sphere
mitre_atlas:
- AML.T0017 # Develop Capabilities - Adversarial ML Attack Development
- AML.T0040 # ML Supply Chain Compromise
mitre_attack:
- T1195 # Supply Chain Compromise
- T1557 # Adversary-in-the-Middle

prerequisites: []

resources:
- title: "Model Context Protocol Specification"
url: "https://modelcontextprotocol.io/specification"
- title: "OWASP LLM05 - Supply Chain Vulnerabilities"
url: "https://owasp.org/www-project-top-10-for-large-language-model-applications/"
- title: "Server-Sent Events Security Considerations"
url: "https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events"
- title: "CWE-494: Download of Code Without Integrity Check"
url: "https://cwe.mitre.org/data/definitions/494.html"
- title: "MCP SSE Transport Security"
url: "https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse"

detector_class: MCPRegistrySwitchDetector
detector_config:
# Patterns indicating MCP registry manipulation attempts
registry_manipulation_patterns:
- "mcp_server_url"
- "mcp_registry"
- "sse_endpoint"
- "tool_server"
- "mcp_endpoint"
# Patterns indicating successful registry switch
success_indicators:
- "registry_url_changed"
- "mcp_server_switched"
- "connecting_to_external"
- "tool_provider_updated"
# External URL patterns (non-localhost)
external_url_pattern: "^https?://(?!localhost|127\\.0\\.0\\.1|\\[::1\\])"
# Event types to monitor
monitored_event_types:
- "mcp.registry.update"
- "mcp.server.connect"
- "mcp.tool.invoke"
- "config.mcp.*"
- "agent.*.tool_call"
min_confidence: 0.6

is_active: true
order_index: 1
Loading
Loading