Vulnerable MCP Server CTF Lab demonstrating CVE-2025-49596 pattern — session isolation failure with cross-request data leakage of admin OAuth tokens and session IDs
This is a deliberately vulnerable CTF lab, not a production MCP server. Tool definitions exist with schemas and descriptions, but the server is designed to leak sensitive data (session IDs, OAuth tokens, admin context) through intentional bugs. Three tools are defined: session_info and token_inspect have empty input schemas (correct for no-arg tools), file_read has a basic path parameter. Descriptions are present but minimal (34 - 72 chars). No parameter descriptions exist. No output schemas documented. Error handling is absent, tools throw raw errors. Security is fundamentally broken: session context is shared across connections (getUserContext() reads from sharedSessionContext), tokens are returned in responses, and session IDs leak via WebSocket broadcasts. This violates every security pattern in the rubric.
Reads a file from the agent-accessible filesystem.
Returns metadata for the currently authenticated agent session.
Inspects the OAuth token bound to the current agent session.
Session context is shared across all connections via sharedSessionContext Map in session.js. getUserContext() returns the same admin session to all callers, enabling cross-session data leaks and privilege escalation.
OAuth tokens and session IDs are returned directly in tool responses (token_inspect returns token_prefix, session_info returns session_id). These secrets enter the LLM context and are logged, violating secret-injection pattern.
No input validation or error handling. file_read accepts any path string without sanitization, enabling path traversal attacks. Tools throw raw errors with no recovery guidance.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | <=2025-11-25 | v2 |
Parameter descriptions are missing. file_read's 'path' parameter has a description, but session_info and token_inspect have no parameters documented. LLMs cannot infer when or how to call these tools.
Output schemas are not documented. Callers cannot predict what fields to expect from tool responses, forcing LLMs to parse unstructured JSON and guess at field names.