Skip to main content
← Vulnerabilities

Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read

Affects code-graph-rag up to and including 0.0.343 when read_file is called with pagination over the HTTP MCP transport. Fixed in 0.0.345.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

7.5HighCNA
Exploited
No known exploitation
Fix
Fixed in 0.0.345
Who is exposed
Default setups

Do first: Check every install: default setups are affected.

Published
Last modified
30/100 · provisional
Default setups
None on Exploit-DB, Metasploit or GitHub

Summary

Code Graph RAG, an AI-powered tool for querying and editing codebases, has a path traversal flaw in its MCP read_file function that lets an unauthenticated attacker on the network read arbitrary UTF-8 files the server process can access, such as credentials, private keys, and configuration. The paginated read path skips the path validation that the non-paginated path performs.

Read the original description

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.

cve.now Index

30Pcve.now Index 30 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure22/25Default setups, reachable over the network without a login
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity7.5/10CVSS 7.5
  • No patch0/5No signal

What would change the score

  • Would score about 70 if added to CISA KEV
  • Would score about 65 if CISA's SSVC rates exploitation active

What to do

  • Check every install: default setups are affected.

  • Upgrade to a fixed version: 0.0.345.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • vitali87 code-graph-rag

    fixed in 0.0.345

Evidence 3

  1. Advisory
  2. Repository
  3. Repository

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-77604

Is CVE-2026-77604 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

A path traversal flaw in the paginated read_file handler lets an unauthenticated remote attacker read any file the cgr mcp-server process can read, including credentials, secrets, private keys, source code and configuration.Source: github.com, github.com

Which versions are affected by CVE-2026-77604?

code-graph-rag: before 0.0.345.Source: cve.now feed data

Am I affected, and how do I check?

Versions up to and including 0.0.343 are affected. The flaw needs a read_file call that supplies offset or limit, and is network-reachable only when the HTTP MCP transport is configured, since stdio is reachable only locally. Check your installed code-graph-rag version and whether cgr mcp-server runs with HTTP transport.Source: github.com, github.com

How do I fix CVE-2026-77604?

Upgrade to 0.0.345 or later if you run cgr mcp-server.Source: github.com, github.com