Skip to content
HighVulnerability

GHSA-vvr2-h2jp-838m: Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read

Published
Record updated
View JSON
Affected
  • code-graph-rag < 0.0.345
Fixed in
0.0.345
  • released July 14, 2026, 118 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

The read_file MCP tool in codebase_rag/mcp/tools.py has a path traversal flaw in its paginated branch, triggered when offset or limit is supplied. The handler builds the path with Path(self.project_root) / file_path and never checks that the result stays inside the project root, so an absolute path such as /etc/passwd is read directly. The non-paginated branch is protected by @validate_project_path, but that decorator is not applied on the paginated path, which the source says is left completely unguarded.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.