Tool Shadowing Detection
Overwatch detects tool shadowing attacks (CVE-2025-6514) where malicious MCP servers attempt to hijack or manipulate tool definitions.What is Tool Shadowing?
Tool shadowing occurs when:- Collision: Two servers define tools with the same name
- Mutation: A tool definition changes mid-session
- Injection: Tool descriptions contain prompt injection
Attack Example
Detection Capabilities
Collision Detection
Same tool name across multiple servers:| Scenario | Severity | Action |
|---|---|---|
| Identical schemas | low | allow |
| Different schemas | critical | deny |
Mutation Detection
Tool definition changes mid-session:| Scenario | Severity | Action |
|---|---|---|
| New tool added | high | prompt |
| Schema changed | critical | deny |
Suspicious Description Analysis
Patterns detected in tool descriptions:- Instruction override attempts
- Role manipulation
- Data exfiltration instructions
- Context boundary markers
- Hidden content (base64, zero-width characters)
Hash-Based Tracking
Overwatch uses SHA-256 hashing to track tool definitions:- Fast comparison across sessions
- Detection of any modification
- Consistent key ordering for deterministic hashes
Configuration
Configure tool shadowing detection inoverwatch.yaml:
Disable Individual Checks
Fully Disabled (Not Recommended)
Response Actions
When tool shadowing is detected:| Severity | Default Action |
|---|---|
| low | Log and allow |
| medium | Warn and prompt |
| high | Warn and prompt |
| critical | Deny |
Best Practices
- Keep detection enabled - Don’t disable tool shadowing detection
- Review tool lists - Check
tools/listresponses for unexpected entries - Monitor for mutations - Alert on any mid-session changes
- Single source of truth - Prefer fewer, trusted MCP servers
- Audit regularly - Review which tools are being used
CVE-2025-6514
This vulnerability allows malicious MCP servers to:- Shadow legitimate tools with malicious versions
- Inject prompt injection in tool descriptions
- Modify tool schemas to request additional data