# CVE-2026-77604: Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read

Status: published. Published: 2026-11-05. Updated: 2026-11-09.

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.

## Remediation

- 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) — https://github.com/advisories/GHSA-vvr2-h2jp-838m

## Affected products and versions

- vitali87 / code-graph-rag: < 0.0.345 (affected). Source: CNA: GitHub_M
-  / code-graph-rag (code-graph-rag): <= 0.0.343 (affected, GitHub advisory range). Source: GitHub GHSA-vvr2-h2jp-838m
-  / code-graph-rag (code-graph-rag): 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: OSV GHSA-vvr2-h2jp-838m

## Severity and prioritization

- CVSS 3.1: 7.5 (high); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N; source: CNA: GitHub_M

- CVSS 3.1: 7.5 (high); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: 0.38% as of 2026-11-09; percentile 32.58%

- SSVC: exploitation poc; automatable yes; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-22

## Exploit evidence

- exploit: https://github.com/openemr/openemr/security/advisories/GHSA-5h9g-m7q2-pv45 (ADP: CISA-ADP)

## References

- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/vitali87/code-graph-rag/commit/6541e920a27961fa8f3ff49ef38c0e0bd09cd626 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.345 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/openemr/openemr/security/advisories/GHSA-5h9g-m7q2-pv45 (ADP: CISA-ADP; exploit)

- https://github.com/vitali87/code-graph-rag/commit/6541e920a27961fa8f3ff49ef38c0e0bd09cd626 (security-advisories@github.com)

- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.345 (security-advisories@github.com)

- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m (security-advisories@github.com)

- https://github.com/openemr/openemr/security/advisories/GHSA-5h9g-m7q2-pv45 (134c704f-9b21-4f2e-91b3-4a467353bcc0)

- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m (GitHub Security Advisories; advisory)

- https://github.com/advisories/GHSA-vvr2-h2jp-838m (OSV / GitHub Security Advisories; advisory)

- https://osv.dev/vulnerability/GHSA-vvr2-h2jp-838m (OSV / GitHub Security Advisories; osv)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-77604; retrieved 2026-11-09; source updated 2026-11-09

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-77604; retrieved 2026-11-10; source updated 2026-11-09

- GitHub Security Advisories: https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m; retrieved 2026-11-07; source updated 2026-08-20

- OSV / GitHub Security Advisories (partial: 1/2 referenced advisories verified): https://osv.dev/vulnerability/GHSA-vvr2-h2jp-838m; retrieved 2026-11-09; source updated 2026-11-09

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-77604; retrieved 2026-11-09; source updated Not reported

Revision: 3c3a6351d4b0896eb822599915d6afd2ce231f7f25550d3d0c44e5f122cc5f22

Canonical: https://y2.dev/cve/CVE-2026-77604

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.