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.
- Exploited
- No known exploitation
- Fix
- Fixed in 0.0.345
- Who is exposed
- Default setups
Do first: Check every install: default setups are affected.
- Last modified
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 30/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Default setups
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 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
- 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
- CVE published
- First seen by cve.now
Affected versions
- vitali87 code-graph-rag
fixed in 0.0.345
Evidence 3
- Advisory
- Repository
- 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