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

Published Nov 5, 2026
·
Updated

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.readfile implementation in codebaserag/mcp/tools.py joins attacker-controlled filepath input to projectroot 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 validateprojectpath, 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

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Code Graph RAG to a version that resolves this vulnerability.

    Fixed in 0.0.345

Event History

Nov 5, 2026
CVE Published
via MITRE·08:10 PM
Data Sourced
via MITRE·08:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to unauthenticated remote file reads?

A network-exposed HTTP MCP server is exposed because an unauthenticated caller can invoke the vulnerable read_file path. Local callers using the stdio transport can also reach the same code path, but they require local access.

2

What input is required to trigger the vulnerable code path?

The caller must use read_file with offset or limit so that execution takes the paginated branch. An absolute file path or a relative path containing traversal can then reference files outside the configured project root.

3

Are all read_file requests affected?

No. The non-paginated branch uses validate_project_path, while the paginated branch bypasses containment validation before opening the file. The issue is therefore tied to requests that select pagination through offset or limit.

4

What can be read if exploitation succeeds?

An attacker can read UTF-8-readable files accessible to the server process. This can include credentials, environment data, private keys, source code, and configuration files.

5

What remediation is available?

Upgrade Code Graph RAG to version 0.0.345, which fixes the issue. If upgrading cannot occur immediately, the provided data supports limiting exposure of the HTTP MCP server and treating files readable by its process as potentially accessible.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203