Public vulnerability disclosure

CVE-2026-77604

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

publishedCWE-22

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.

Technical severity7.5 highCVSS 3.1 · CNA: GitHub_M
Published2026-11-05Source updated 2026-11-09
Collected2026-11-105 attributed sources

Fixes and workarounds

Fix

code-graph-rag (PyPI): OSV reports a fixed version 0.0.345. Check the advisory for supported release branches.

Source: OSV GHSA-vvr2-h2jp-838m

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
code-graph-rag
vitali87
< 0.0.345 (affected) CNA: GitHub_M
code-graph-rag

code-graph-rag
pip
<= 0.0.343 (affected, GitHub advisory range) GitHub GHSA-vvr2-h2jp-838m
code-graph-rag

code-graph-rag
PyPI
0.0.100 (affected, PyPI)
0.0.148 (affected, PyPI)
0.0.187 (affected, PyPI)
0.0.209 (affected, PyPI)
0.0.245 (affected, PyPI)
0.0.246 (affected, PyPI)
0.0.79 (affected, PyPI)
0.0.84 (affected, PyPI)
0.0.88 (affected, PyPI)
0.0.99 (affected, PyPI)
Ecosystem version events: introduced 0; fixed 0.0.345
Source events (ECOSYSTEM)
[
  {
    "introduced": "0"
  },
  {
    "fixed": "0.0.345"
  }
]

Other versions: unaffected
OSV GHSA-vvr2-h2jp-838m

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
3.1 / 7.5
high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NCNA: GitHub_M
3.1 / 7.5
high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NNVD: [email protected]

Exploit evidence

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide