CVE-2026-77604
Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read
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.
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-838mAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| code-graph-rag vitali87 |
< 0.0.345 (affected) | CNA: GitHub_M |
code-graph-ragcode-graph-rag
pip |
<= 0.0.343 (affected, GitHub advisory range) | GitHub GHSA-vvr2-h2jp-838m |
code-graph-ragcode-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)
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
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 7.5 high |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | CNA: 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:N | NVD: [email protected] |
Exploit evidence
- https://github.com/openemr/openemr/security/advisories/GHSA-5h9g-m7q2-pv45
exploit · ADP: CISA-ADP
References
- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838mCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/vitali87/code-graph-rag/commit/6541e920a27961fa8f3ff49ef38c0e0bd09cd626CNA: GitHub_M · x_refsource_MISC
- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.345CNA: GitHub_M · x_refsource_MISC
- https://github.com/openemr/openemr/security/advisories/GHSA-5h9g-m7q2-pv45ADP: CISA-ADP · exploit
- https://github.com/vitali87/code-graph-rag/commit/6541e920a27961fa8f3ff49ef38c0e0bd09cd626[email protected]
- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.345[email protected]
- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838m[email protected]
- https://github.com/openemr/openemr/security/advisories/GHSA-5h9g-m7q2-pv45134c704f-9b21-4f2e-91b3-4a467353bcc0
- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-vvr2-h2jp-838mGitHub Security Advisories · advisory
- https://github.com/advisories/GHSA-vvr2-h2jp-838mOSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-vvr2-h2jp-838mOSV / GitHub Security Advisories · osv
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/cveshttps://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.