Path traversal in Code Graph RAG MCP lets attackers read files
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-22 and the CVSS impact.
Summary
Code Graph RAG from vitali87 before 0.0.345 has a path traversal flaw (CWE-22) in the read_file tool of its MCP server. The paginated branch of read_file skips path validation, so an absolute or traversal path can reach files outside the project root. An unauthenticated remote attacker who can reach a network-exposed HTTP MCP server can read any UTF-8 file the server process can access, including credentials and private keys.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
Code Graph RAG is an AI-powered knowledge graph and retrieval system for querying, understanding, and editing multi-language codebases. Prior to 0.0.345, the MCPToolsRegistry.read_file implementation in codebase_rag/mcp/tools.py joins attacker-controlled file_path input to project_root without resolving and verifying containment when offset or limit selects the paginated branch. An absolute path causes pathlib to discard the configured root, while relative traversal can also resolve outside it. The protected non-paginated branch uses validate_project_path, but the paginated branch bypasses that validation before opening the path. An unauthenticated caller of a network-exposed HTTP MCP server can therefore read arbitrary UTF-8-readable files available to the server process, including credentials, environment data, private keys, source, and configuration; local callers through the stdio transport can reach the same vulnerable code path. This issue is fixed in version 0.0.345.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update Code Graph RAG to version 0.0.345, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA code-graph-rag (vitali87) Fixed in 0.0.345
Vendor assessments
Timeline
- 2026-11-05 Threatist record created from CVE-2026-77604
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
- 2026-11-07 Priority changed: MEDIUM → LOW
References
More vitali87 vulnerabilities
- TI-2026-85644 Code Graph RAG tools follow symlinks outside the project root CVSS 3.1HIGH 7.1
Sources
- CVE-2026-77604 · CVE Program
- CVE-2026-77604 · NVD
- FIRST EPSS
- CVE-2026-77604 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences