Technical impact
The vulnerability is a path traversal flaw in the paginated read_file function of Code Graph RAG’s MCPToolsRegistry. The code concatenates an attacker-controlled file_path with the project root without performing path resolution or containment checks when offset or limit is used. An absolute path can cause pathlib to discard the root configuration, and a relative traversal can resolve outside the intended directory. As a result, an unauthenticated caller can read any UTF‑8‑readable file accessible to the server process, including credentials, environment data, private keys, source code, and configuration files.
Affected Systems
All versions of vitali87:code-graph-rag prior to 0.0.345 are affected. The issue was fixed in release v0.0.345. No other vendors or products are listed as impacted.
Risk and Exploitability
The flaw has a CVSS score of 7.5, indicating high severity, and there is no EPSS score available. It does not appear in the CISA KEV catalog. The likely attack vector is via the network when the HTTP MCP server is exposed; local callers through the standard IO transport can also exploit the same code path. An attacker does not need authentication to read arbitrary files, making the exploitation straightforward if the vulnerable endpoint is reachable.
Github GHSA