debugmcp mcp-debugger Path Traversal Vulnerability

Vulnerability

A path traversal vulnerability has been identified in debugmcp mcp-debugger versions prior to 0.20.0. The issue arises in the handleGetSourceContext function within src/server.ts, where user-controlled file input is not properly validated. In host mode, the input path is returned unchanged, allowing access to arbitrary absolute filesystem paths. This vulnerability can be exploited remotely, leading to unauthorized file read capabilities.

Impact

Exploitation of this vulnerability allows for arbitrary file read access on the server's filesystem.

Reproduction

To reproduce this vulnerability, send a source-context request with a file value controlled by the attacker. The server will process this request by checking if the file exists and then reading the specified lines from it. In host mode, the server does not enforce any workspace boundaries and directly accesses the filesystem, enabling the traversal attack.

Added: May 26, 2026, 7:07 PM
Updated: May 26, 2026, 7:07 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.6
exploitability
8.7
remediation
0.0
relevance
9.4
threat
6.4
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.